Skip to content

Instantly share code, notes, and snippets.

@JunKikuchi
Created July 29, 2009 03:30
Show Gist options
  • Save JunKikuchi/157856 to your computer and use it in GitHub Desktop.
Save JunKikuchi/157856 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'typhoeus'
class Remote
include Typhoeus
end
# http://groups.google.co.jp/group/typhoeus/browse_thread/thread/f890713ec5d275f1?hl=ja
#
# following get does't fire.
a = Remote.get 'http://localhost:8080/'
# とりあえず、こうやってつかうことにする。
http = Typhoeus::Easy.new
http.url = 'http://localhost:8080/aaa?a=10&b=20'
http.url = 'http://localhost:8080/'
http.perform
p http.headers
p http.response_code
p http.response_header
p http.response_body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment