cool.io-http GitHub - godfat/cool.io-http: Simpler HTTP for cool.io
by Lin Jen-Shin (godfat)
DESCRIPTION:
Simpler HTTP for cool.io
INSTALLATION:
gem install cool.io-http
SYNOPSIS:
Asynchrony client:
require 'cool.io/http'
Coolio::Http.request(:url => 'https://google.com'){ |response,
headers|
puts “Response: #{response}”
puts
puts " Headers: #{headers}"
}
Coolio::Loop.default.run
Fiber-aware synchrony client:
require 'cool.io/http'
Fiber.new{
Coolio::HttpFiber.request(:url => 'https://google.com'){ |r, h|
puts "Response: #{r}"
puts
puts " Headers: #{h}"
}
puts "DONE"
}.resume
puts "GO"
Coolio::Loop.default.run
CHANGES:
cool.io-http 0.2.1 – 2012-01-09
- Added SSL (HTTPS) supports
- Added Coolio::Http#ssl?