Class: RestClient::Request

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

Instance Method Summary collapse

Instance Method Details

#make_headers(user_headers) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/vagrant-proxmox/proxmox/connection.rb', line 9

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