Class | EventMachine::Protocols::HttpClient2
In: | lib/protocols/httpcli2.rb
Parent: | Connection

# Example

     EM.run{
       include EM::Protocols
       conn = HttpClient2.connect 'google.com', 80

       req = conn.get('/')
       req.callback{
         p(req.content)
       }

### Methods

connect connection_completed get pop_request post post_init receive_binary_data receive_line request set_default_host_header unbind

### Included Modules

LineText2

### Classes and Modules

Class EventMachine::Protocols::HttpClient2::Request

### Public Class methods

connect(*args)

Make a connection to a remote HTTP server. Can take either a pair of arguments (which will be interpreted as a hostname/ip-address and a port), or a hash. If the arguments are a hash, then supported values include:

     :host => a hostname or ip-address;
     :port => a port number

### Public Instance methods

connection_completed()
get(args)
pop_request()
post(args)
post_init()
receive_binary_data(text)
receive_line(ln)
request(args)
set_default_host_header(host, port, ssl)
unbind()

[Validate]