Method: Fog::DNS::Rage4::Real#request

Defined in:
lib/fog/rage4/dns.rb

#request(params) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/fog/rage4/dns.rb', line 56

def request(params)
  params[:headers] ||= {}
  key = "#{@rage4_email}:#{@rage4_password}"
  params[:headers].merge!({ "Authorization" => "Basic " + Base64.encode64(key).gsub("\n",'')})

  response = @connection.request(params)

  unless response.body.empty?
    response.body = Fog::JSON.decode(response.body)
  end
  response
end