Class: Coolio::HttpFiber
- Defined in:
- lib/cool.io/http_fiber.rb
Class Method Summary collapse
Methods inherited from Http
connect, #initialize, #on_body_data, #on_connect, #on_request_complete, #on_response_header, #request, #ssl?
Constructor Details
This class inherits a constructor from Coolio::Http
Class Method Details
.request(opts = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/cool.io/http_fiber.rb', line 5 def self.request opts={} f = Fiber.current super(opts){ |response| yield(response) if block_given? f.resume(response) } Fiber.yield end |