dnsimple 2.0.0.a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.rspec +1 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +7 -0
  7. data/CHANGELOG.markdown +50 -0
  8. data/Gemfile +3 -0
  9. data/LICENSE +22 -0
  10. data/README.markdown +60 -0
  11. data/Rakefile +33 -0
  12. data/dnsimple-ruby.gemspec +26 -0
  13. data/lib/dnsimple-ruby.rb +1 -0
  14. data/lib/dnsimple.rb +33 -0
  15. data/lib/dnsimple/base.rb +10 -0
  16. data/lib/dnsimple/certificate.rb +129 -0
  17. data/lib/dnsimple/client.rb +144 -0
  18. data/lib/dnsimple/contact.rb +154 -0
  19. data/lib/dnsimple/domain.rb +217 -0
  20. data/lib/dnsimple/error.rb +21 -0
  21. data/lib/dnsimple/extended_attribute.rb +52 -0
  22. data/lib/dnsimple/record.rb +94 -0
  23. data/lib/dnsimple/service.rb +42 -0
  24. data/lib/dnsimple/template.rb +63 -0
  25. data/lib/dnsimple/template_record.rb +80 -0
  26. data/lib/dnsimple/transfer_order.rb +34 -0
  27. data/lib/dnsimple/user.rb +26 -0
  28. data/lib/dnsimple/version.rb +3 -0
  29. data/spec/ci/.dnsimple.test +3 -0
  30. data/spec/dnsimple/certificate_spec.rb +56 -0
  31. data/spec/dnsimple/client_spec.rb +107 -0
  32. data/spec/dnsimple/contact_spec.rb +45 -0
  33. data/spec/dnsimple/domain_spec.rb +133 -0
  34. data/spec/dnsimple/extended_attributes_spec.rb +54 -0
  35. data/spec/dnsimple/record_spec.rb +51 -0
  36. data/spec/dnsimple/template_spec.rb +31 -0
  37. data/spec/dnsimple/user_spec.rb +31 -0
  38. data/spec/files/account/user/success.http +19 -0
  39. data/spec/files/certificates/index/success.http +19 -0
  40. data/spec/files/certificates/show/notfound.http +17 -0
  41. data/spec/files/certificates/show/success.http +19 -0
  42. data/spec/files/contacts/show/notfound.http +17 -0
  43. data/spec/files/contacts/show/success.http +19 -0
  44. data/spec/files/domains/auto_renewal_disable/notfound.http +21 -0
  45. data/spec/files/domains/auto_renewal_disable/success.http +23 -0
  46. data/spec/files/domains/auto_renewal_enable/notfound.http +21 -0
  47. data/spec/files/domains/auto_renewal_enable/success.http +23 -0
  48. data/spec/files/domains/show/notfound.http +17 -0
  49. data/spec/files/domains/show/success.http +19 -0
  50. data/spec/files/extended_attributes/ca.http +19 -0
  51. data/spec/files/extended_attributes/com.http +19 -0
  52. data/spec/files/extended_attributes/success.http +19 -0
  53. data/spec/files/records/index/success.http +19 -0
  54. data/spec/files/records/show/notfound.http +17 -0
  55. data/spec/files/records/show/success.http +19 -0
  56. data/spec/files/templates/show/notfound.http +17 -0
  57. data/spec/files/templates/show/success.http +19 -0
  58. data/spec/spec_helper.rb +34 -0
  59. data/spec/support/helpers.rb +15 -0
  60. data/spec/support/webmock.rb +11 -0
  61. metadata +224 -0
@@ -0,0 +1,133 @@
1
+ require 'spec_helper'
2
+
3
+ describe DNSimple::Domain do
4
+
5
+ let(:contact_id) { 1001 }
6
+
7
+ describe ".find" do
8
+ before do
9
+ stub_request(:get, %r[/v1/domains/example.com]).
10
+ to_return(read_fixture("domains/show/success.http"))
11
+ end
12
+
13
+ it "builds the correct request" do
14
+ described_class.find("example.com")
15
+
16
+ expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com").
17
+ with(:headers => { 'Accept' => 'application/json' })
18
+ end
19
+
20
+ context "when the domain exists" do
21
+ it "returns the domain" do
22
+ result = described_class.find("example.com")
23
+
24
+ expect(result).to be_a(described_class)
25
+ expect(result.id).to eq(6)
26
+ expect(result.name).to eq("test-1383931357.com")
27
+ expect(result.expires_on).to eq('2015-11-08')
28
+ expect(result.created_at).to eq("2013-11-08T17:22:48Z")
29
+ expect(result.updated_at).to eq("2014-01-14T18:27:04Z")
30
+ expect(result.state).to eq("registered")
31
+ expect(result.registrant_id).to eq(2)
32
+ expect(result.user_id).to eq(2)
33
+ expect(result.lockable).to eq(true)
34
+ expect(result.auto_renew).to eq(true)
35
+ expect(result.whois_protected).to eq(false)
36
+
37
+ expect(result.name_server_status).to be_nil
38
+ end
39
+ end
40
+ end
41
+
42
+ describe "#enable_auto_renew" do
43
+ let(:domain) { described_class.new(name: 'example.com', auto_renew: false) }
44
+
45
+ context "when response is not 200" do
46
+ before do
47
+ stub_request(:post, %r[/v1/domains/example.com/auto_renewal]).
48
+ to_return(read_fixture("domains/auto_renewal_enable/notfound.http"))
49
+ end
50
+
51
+ it "raises a RequestError" do
52
+ expect { domain.enable_auto_renew }.to raise_error(DNSimple::RequestError)
53
+ end
54
+ end
55
+
56
+ context "when auto_renew is true" do
57
+ let(:domain) { described_class.new(name: 'example.com', auto_renew: true) }
58
+
59
+ it "does not send a web request" do
60
+ domain.enable_auto_renew
61
+ expect(WebMock).to have_not_been_made
62
+ end
63
+ end
64
+
65
+ context "when auto_renew is false" do
66
+ let(:domain) { described_class.new(name: 'example.com', auto_renew: false) }
67
+
68
+ before do
69
+ stub_request(:post, %r[/v1/domains/example.com/auto_renewal]).
70
+ to_return(read_fixture("domains/auto_renewal_enable/success.http"))
71
+ end
72
+
73
+ it "builds the correct request to enable auto_renew" do
74
+ domain.enable_auto_renew
75
+
76
+ expect(WebMock).to have_requested(:post, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/auto_renewal").
77
+ with(:headers => { 'Accept' => 'application/json' })
78
+ end
79
+
80
+ it "sets auto_renew to true on the domain" do
81
+ domain.enable_auto_renew
82
+ expect(domain.auto_renew).to be_truthy
83
+ end
84
+ end
85
+
86
+ end
87
+
88
+ describe "#disable_auto_renew" do
89
+ let(:domain) { described_class.new(name: 'example.com', auto_renew: true) }
90
+
91
+ context "when response is not 200" do
92
+ before do
93
+ stub_request(:delete, %r[/v1/domains/example.com/auto_renewal]).
94
+ to_return(read_fixture("domains/auto_renewal_disable/notfound.http"))
95
+ end
96
+
97
+ it "raises a RequestError" do
98
+ expect { domain.disable_auto_renew }.to raise_error(DNSimple::RequestError)
99
+ end
100
+ end
101
+
102
+ context "when auto_renew is false" do
103
+ let(:domain) { described_class.new(name: 'example.com', auto_renew: false) }
104
+
105
+ it "does not send a web request" do
106
+ domain.disable_auto_renew
107
+ expect(WebMock).to have_not_been_made
108
+ end
109
+ end
110
+
111
+ context "when auto_renew is true" do
112
+ let(:domain) { described_class.new(name: 'example.com', auto_renew: true) }
113
+
114
+ before do
115
+ stub_request(:delete, %r[/v1/domains/example.com/auto_renewal]).
116
+ to_return(read_fixture("domains/auto_renewal_disable/success.http"))
117
+ end
118
+
119
+ it "builds the correct request to disable auto_renew" do
120
+ domain.disable_auto_renew
121
+
122
+ expect(WebMock).to have_requested(:delete, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/auto_renewal").
123
+ with(:headers => { 'Accept' => 'application/json' })
124
+ end
125
+
126
+ it "sets auto_renew to false on the domain" do
127
+ domain.disable_auto_renew
128
+ expect(domain.auto_renew).to be_falsey
129
+ end
130
+ end
131
+
132
+ end
133
+ end
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe DNSimple::ExtendedAttribute do
4
+
5
+ describe ".find" do
6
+ before do
7
+ stub_request(:get, %r[/v1/extended_attributes/com]).
8
+ to_return(read_fixture("extended_attributes/success.http"))
9
+ end
10
+
11
+ it "builds the correct request" do
12
+ described_class.find("com")
13
+
14
+ expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/extended_attributes/com").
15
+ with(:headers => { 'Accept' => 'application/json' })
16
+ end
17
+
18
+ context "when the TLD has no attributes" do
19
+ before do
20
+ stub_request(:get, %r[/v1/extended_attributes/com]).
21
+ to_return(read_fixture("extended_attributes/com.http"))
22
+ end
23
+
24
+ it "returns an empty list" do
25
+ result = described_class.find("com")
26
+
27
+ expect(result).to eq([])
28
+ end
29
+ end
30
+
31
+ context "when the TLD has attributes" do
32
+ before do
33
+ stub_request(:get, %r[/v1/extended_attributes/ca]).
34
+ to_return(read_fixture("extended_attributes/ca.http"))
35
+ end
36
+
37
+ it "returns the attributes" do
38
+ result = described_class.find("ca")
39
+
40
+ expect(result).to be_a(Array)
41
+ expect(result.size).to eq(5)
42
+
43
+ attribute = result[0]
44
+ expect(attribute).to be_a(described_class)
45
+ expect(attribute.name).to eq("cira_legal_type")
46
+ expect(attribute.description).to eq("Legal type of registrant contact")
47
+ expect(attribute.required).to be_truthy
48
+ expect(attribute.options).to be_a(Array)
49
+ expect(attribute.options.size).to eq(18)
50
+ end
51
+ end
52
+ end
53
+
54
+ end
@@ -0,0 +1,51 @@
1
+ require 'spec_helper'
2
+
3
+ describe DNSimple::Record do
4
+
5
+ let(:domain) { DNSimple::Domain.new(:name => 'example.com') }
6
+
7
+
8
+ describe ".find" do
9
+ before do
10
+ stub_request(:get, %r[/v1/domains/example.com/records/2]).
11
+ to_return(read_fixture("records/show/success.http"))
12
+ end
13
+
14
+ it "builds the correct request" do
15
+ described_class.find(domain, "2")
16
+
17
+ expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/domains/example.com/records/2").
18
+ with(:headers => { 'Accept' => 'application/json' })
19
+ end
20
+
21
+ context "when the record exists" do
22
+ it "returns the record" do
23
+ result = described_class.find(domain, "2")
24
+
25
+ expect(result).to be_a(described_class)
26
+ expect(result.id).to eq(1495)
27
+ expect(result.domain).to be(domain)
28
+ expect(result.name).to eq("www")
29
+ expect(result.content).to eq("1.2.3.4")
30
+ expect(result.ttl).to eq(3600)
31
+ expect(result.prio).to be_nil
32
+ expect(result.record_type).to eq("A")
33
+ end
34
+ end
35
+ end
36
+
37
+
38
+ describe "#fqdn" do
39
+ it "joins the name and domain name" do
40
+ record = described_class.new(:name => 'www', :domain => domain)
41
+ expect(record.fqdn).to eq("www.#{domain.name}")
42
+ end
43
+
44
+ it "strips a blank name" do
45
+ record = described_class.new(:name => '', :domain => domain)
46
+ expect(record.fqdn).to eq(domain.name)
47
+ end
48
+ end
49
+
50
+ end
51
+
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe DNSimple::Template do
4
+
5
+ describe ".find" do
6
+ before do
7
+ stub_request(:get, %r[/v1/templates/google-apps]).
8
+ to_return(read_fixture("templates/show/success.http"))
9
+ end
10
+
11
+ it "builds the correct request" do
12
+ described_class.find("google-apps")
13
+
14
+ expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/templates/google-apps").
15
+ with(:headers => { 'Accept' => 'application/json' })
16
+ end
17
+
18
+ context "when the template exists" do
19
+ it "returns the template" do
20
+ result = described_class.find("google-apps")
21
+
22
+ expect(result).to be_a(described_class)
23
+ expect(result.id).to eq(63)
24
+ expect(result.name).to eq("Google Apps")
25
+ expect(result.short_name).to eq("google-apps")
26
+ expect(result.description).to eq("The Google Mail Servers and Google Apps CNAME records in a single template.")
27
+ end
28
+ end
29
+ end
30
+
31
+ end
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe DNSimple::User do
4
+ describe ".me" do
5
+ before do
6
+ stub_request(:get, %r[/v1/user]).
7
+ to_return(read_fixture("account/user/success.http"))
8
+ end
9
+
10
+ it "builds the correct request" do
11
+ described_class.me
12
+
13
+ expect(WebMock).to have_requested(:get, "https://#{CONFIG['username']}:#{CONFIG['password']}@#{CONFIG['host']}/v1/user").
14
+ with(:headers => { 'Accept' => 'application/json' })
15
+ end
16
+
17
+ it "returns the user" do
18
+ result = described_class.me
19
+
20
+ expect(result).to be_a(described_class)
21
+ expect(result.id).to eq(19)
22
+ expect(result.email).to eq("example@example.com")
23
+ expect(result.domain_count).to be_a(Integer)
24
+ expect(result.domain_limit).to be_a(Integer)
25
+ expect(result.login_count).to be_a(Integer)
26
+ expect(result.failed_login_count).to be_a(Integer)
27
+ expect(result.created_at).to eq("2014-01-15T21:59:04Z")
28
+ expect(result.updated_at).to be_a(String)
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Wed, 15 Jan 2014 23:22:55 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "95b5414d75f4adff476276f378e1a742"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: 15e68ad6a41c24c727d57cfc1a733de7
16
+ X-Runtime: 0.022328
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"user":{"id":19,"email":"example@example.com","referral_token":"ad932ffb60c295","single_access_token":"api-token","default_contact_id":null,"phone":null,"country_code":null,"authy_identifier":null,"authy_verified_at":null,"domain_count":2,"domain_limit":500,"login_count":3,"failed_login_count":0,"unsubscribed_at":null,"created_at":"2014-01-15T21:59:04Z","updated_at":"2014-01-15T23:21:50Z","first_name":null,"last_name":null}}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.5.8
3
+ Date: Tue, 14 Jan 2014 18:37:59 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "68c94c6eefc81fd3fc85b068a7c65029"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: f06a7d3fc56223e9db4c14f548c43d7a
16
+ X-Runtime: 0.046608
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ [{"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"cancelled","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.com","expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z","available_approver_emails":null,"certificate_status":null}},{"certificate":{"id":4578,"domain_id":79569,"contact_id":11549,"name":"www","state":"cancelled","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\n2iT9OvY4afImf2ZcXnYZGrfXCx4GOxeMDpNcQm0RT3gLGw==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":null,"private_key":"-----BEGIN RSA PRIVATE KEY-----\nwDj89yRezuhCL5K1MSVohQyhyESr9Vz93p4r31DZxAmgFbCRE+g=\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.com","expires_on":"2014-09-17","created_at":"2013-09-17T22:30:03Z","updated_at":"2013-09-17T22:30:41Z","configured_at":"2013-09-17T22:30:08Z","available_approver_emails":null,"certificate_status":null}}]
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 404 Not Found
2
+ Server: nginx/1.5.8
3
+ Date: Tue, 14 Jan 2014 18:40:45 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 404 Not Found
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ Cache-Control: no-cache
14
+ X-Request-Id: d38b463c18b96625c085e1ca121a7ffd
15
+ X-Runtime: 0.034619
16
+
17
+ {"error":"Couldn't find Certificate with id=12 [WHERE \"certificates\".\"domain_id\" = 79569]"}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.5.8
3
+ Date: Tue, 14 Jan 2014 18:40:28 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "2b76f0ea88c7e95384506ac576d23d01"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: aaf5915a32924165d4f45779689831fa
16
+ X-Runtime: 0.042263
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"certificate":{"id":4576,"domain_id":79569,"contact_id":11549,"name":"www","state":"cancelled","csr":"-----BEGIN NEW CERTIFICATE REQUEST-----\nRHr2akB4KMba6FMAsvlStnO/2ika16hNx+d3smPNsER+HA==\n-----END NEW CERTIFICATE REQUEST-----\n","ssl_certificate":"-----BEGIN CERTIFICATE-----\nXwTkw5UCPpaVyUYcwHlvaprOe9ZbwIyEHm2AT1rW+70=\n-----END CERTIFICATE-----\n","private_key":"-----BEGIN RSA PRIVATE KEY-----\nUeXbFi7o+nuPfRhpBFQEKwacKFc3Hnc1hH6UsnC0KY25cUif7yz38A==\n-----END RSA PRIVATE KEY-----\n","approver_email":"example@example.net","expires_on":"2014-09-17","created_at":"2013-09-17T21:54:42Z","updated_at":"2013-09-17T22:25:36Z","configured_at":"2013-09-17T22:25:01Z","available_approver_emails":null,"certificate_status":null}}
@@ -0,0 +1,17 @@
1
+ HTTP/1.1 404 Not Found
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:03:42 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 404 Not Found
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ Cache-Control: no-cache
14
+ X-Request-Id: 06b719043c001f90932f8984c0b5d301
15
+ X-Runtime: 0.035035
16
+
17
+ {"error":"Couldn't find Contact with id=20 [WHERE (user_id = 2 or organization_id in (NULL))]"}
@@ -0,0 +1,19 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Tue, 14 Jan 2014 18:03:26 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 200 OK
8
+ X-DNSimple-API-Version: 1.0.0
9
+ Access-Control-Allow-Origin: *
10
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
11
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
12
+ X-UA-Compatible: IE=Edge,chrome=1
13
+ ETag: "c8da059d309b1de77a7b400c6c8febb0"
14
+ Cache-Control: max-age=0, private, must-revalidate
15
+ X-Request-Id: 954fef00cf763b3de6211670a740ebc9
16
+ X-Runtime: 0.040477
17
+ Strict-Transport-Security: max-age=315360000
18
+
19
+ {"contact":{"id":2,"user_id":2,"label":"Default","first_name":"Simone","last_name":"Carletti","job_title":"Underwater Programmer","organization_name":"DNSimple","email_address":"example@example.com","phone":"+1 111 000000","fax":"+1 222 000000","address1":"Awesome Street","address2":"c/o Someone","city":"Rome","state_province":"RM","postal_code":"00171","country":"IT","created_at":"2013-11-08T17:23:15Z","updated_at":"2013-11-08T17:23:15Z","phone_ext":null}}
@@ -0,0 +1,21 @@
1
+ HTTP/1.1 404 Not Found
2
+ Server: nginx/1.4.7
3
+ Date: Tue, 01 Jul 2014 16:16:47 GMT
4
+ Content-Type: application/json; charset=utf-8
5
+ Transfer-Encoding: chunked
6
+ Connection: close
7
+ Status: 404 Not Found
8
+ Strict-Transport-Security: max-age=631138519
9
+ X-Frame-Options: SAMEORIGIN
10
+ X-XSS-Protection: 1
11
+ X-Content-Type-Options: nosniff
12
+ X-UA-Compatible: chrome=1
13
+ Access-Control-Allow-Origin: *
14
+ Access-Control-Allow-Headers: Authorization,Accepts,Content-Type,X-DNSimple-Token,X-DNSimple-Domain-Token,X-CSRF-Token,x-requested-with
15
+ Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
16
+ Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src 'self' data: netdna.bootstrapcdn.com *.edgecastcdn.net; frame-src 'self'; img-src 'self' data: *.nr-data.net; media-src 'self'; object-src 'self'; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' *.getdrip.com *.visualwebsiteoptimizer.com *.doubleclick.net *.pathful.com *.newrelic.com; style-src 'self' data: 'unsafe-inline' 'unsafe-eval' netdna.bootstrapcdn.com cloud.webtype.com cloud.typography.com;
17
+ Cache-Control: no-cache
18
+ X-Request-Id: a3258b20-64e8-4a82-aed2-7487b8fbd941
19
+ X-Runtime: 0.020447
20
+
21
+ {"message":"Domain `example.com' not found","error":"Domain `example.com' not found"}