Cool.io-http 0.2.1 released

cool.io-http https://github.com/godfat/cool.io-http

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?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs