Skip to content
This repository
Newer
Older
100644 19 lines (16 sloc) 0.518 kb
a4fcfee5 »
2012-01-27 - Commit work-in-progress. Shit I dont' want to write, but ruby stdlib
1 require "rubygems"
2 require "addressable/uri"
10864e36 »
2012-01-28 - Yay I can make http requests finally.
3 require "thread"
a4fcfee5 »
2012-01-27 - Commit work-in-progress. Shit I dont' want to write, but ruby stdlib
4
5 $: << File.join(File.dirname(__FILE__), "lib")
6 require "net-ftw" # gem net-ftw
55359d2a »
2012-02-07 - update readme with some public APi ideas
7 require "net/ftw/http/client2"
a4fcfee5 »
2012-01-27 - Commit work-in-progress. Shit I dont' want to write, but ruby stdlib
8
55359d2a »
2012-02-07 - update readme with some public APi ideas
9 client = Net::FTW::HTTP::Client2.new
10864e36 »
2012-01-28 - Yay I can make http requests finally.
10 #uri = Addressable::URI.parse("http://httpbin.org/ip")
55359d2a »
2012-02-07 - update readme with some public APi ideas
11 uri = Addressable::URI.parse("http://google.com/")
12 #uri = Addressable::URI.parse("http://twitter.com/")
10864e36 »
2012-01-28 - Yay I can make http requests finally.
13
14 # 'client.get' is not the end of this api. still in progress.
55359d2a »
2012-02-07 - update readme with some public APi ideas
15 fiber = client.get(uri)
16 p fiber.resume
17 p fiber.resume
18 p fiber.resume
19 p fiber.resume
a4fcfee5 »
2012-01-27 - Commit work-in-progress. Shit I dont' want to write, but ruby stdlib
20
Something went wrong with that request. Please try again.