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:
parent
5dad9a5522
commit
b2ff51eccc
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,7 @@ module Fog
|
||||||
options[:port] = uri.port
|
options[:port] = uri.port
|
||||||
options[:scheme] = uri.scheme
|
options[:scheme] = uri.scheme
|
||||||
end
|
end
|
||||||
@host = options[:host] || "dnsimple.com"
|
@host = options[:host] || "api.dnsimple.com"
|
||||||
@persistent = options[:persistent] || false
|
@persistent = options[:persistent] || false
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
|
@ -85,6 +85,9 @@ module Fog
|
||||||
"Accept" => "application/json",
|
"Accept" => "application/json",
|
||||||
"Content-Type" => "application/json" })
|
"Content-Type" => "application/json" })
|
||||||
|
|
||||||
|
version = params.delete(:version) || 'v1'
|
||||||
|
params[:path] = "/#{version}#{params[:path]}"
|
||||||
|
|
||||||
response = @connection.request(params)
|
response = @connection.request(params)
|
||||||
|
|
||||||
unless response.body.empty?
|
unless response.body.empty?
|
||||||
|
|
Loading…
Add table
Reference in a new issue