Skip to content

Instantly share code, notes, and snippets.

@paulcsmith
Last active December 22, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulcsmith/21d34f079525c669b1f4ada4746579ad to your computer and use it in GitHub Desktop.
Save paulcsmith/21d34f079525c669b1f4ada4746579ad to your computer and use it in GitHub Desktop.
require "http"
private def client
HTTP::Client.new(host: "www.googleapis.com", tls: context)
end
private def context
# I did this to customize the context, but haven't been
# able to figure out how to make this work
context = OpenSSL::SSL::Context::Client.new
context
end
client.get("/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment