1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Switch to DNSimple versioned API

This commit is contained in:
Simone Carletti 2014-01-16 22:47:22 +01:00
parent 5dad9a5522
commit b2ff51eccc

View file

@ -67,7 +67,7 @@ module Fog
options[:port] = uri.port
options[:scheme] = uri.scheme
end
@host = options[:host] || "dnsimple.com"
@host = options[:host] || "api.dnsimple.com"
@persistent = options[:persistent] || false
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'
@ -85,6 +85,9 @@ module Fog
"Accept" => "application/json",
"Content-Type" => "application/json" })
version = params.delete(:version) || 'v1'
params[:path] = "/#{version}#{params[:path]}"
response = @connection.request(params)
unless response.body.empty?