summaryrefslogtreecommitdiff
path: root/macir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'macir.rb')
-rw-r--r--macir.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/macir.rb b/macir.rb
new file mode 100644
index 0000000..0bc2382
--- /dev/null
+++ b/macir.rb
@@ -0,0 +1,26 @@
+#!/usr/bin/ruby
+
+require 'net/http'
+require 'json'
+
+acme_directory_uri = URI('https://acme-staging-v02.api.letsencrypt.org/directory')
+acme_directory_uri.freeze
+hostname = acme_directory_uri.hostname
+path = acme_directory_uri.path
+port = acme_directory_uri.port
+
+acme_directory_json = Net::HTTP.get(acme_directory_uri)
+acme_directory = JSON.parse(acme_directory_json)
+pp acme_directory
+
+newAccount_uri = acme_directory['newAccount']
+p newAccount_uri
+
+
+# Net::HTTP.get(hostname, '/index.html')
+# Net::HTTP.start(hostname) do |http|
+# http.get('/todos/1') do |res|
+# p res
+# end
+# end
+