Skip to content

Instantly share code, notes, and snippets.

@itang
Created January 2, 2015 13:38
Show Gist options
  • Save itang/30383b80ffd3cdb709f5 to your computer and use it in GitHub Desktop.
Save itang/30383b80ffd3cdb709f5 to your computer and use it in GitHub Desktop.
require "http"
client = HTTP::Client.new("localhost", 8080)
resp = client.get "/"
p resp.status_code
resp.headers.each do |k, v|
puts "#{k}= #{v}"
end
p resp.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment