Class: RestClient::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-proxmox/plugin.rb

Instance Method Summary collapse

Instance Method Details

#make_headers(user_headers) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/vagrant-proxmox/plugin.rb', line 4

def make_headers user_headers
	unless @cookies.empty?
		user_headers[:cookie] = @cookies.map { |(key, val)| "#{key.to_s}=#{val}" }.sort.join('; ')
	end
	headers = stringify_headers(default_headers).merge(stringify_headers(user_headers))
	headers.merge!(@payload.headers) if @payload
	headers
end