Class | EventMachine::Protocols::HttpClient
In: | lib/protocols/httpclient.rb
Parent: | Connection

### Methods

connection_completed dispatch_response post_init receive_data request send_request unbind

### Included Modules

EventMachine::Deferrable

### Constants

MaxPostContentLength | = | 20 * 1024 * 1024

### Public Class methods

request( args = {} )

### Arg list

:host => ‘ip/dns’, :port => fixnum, :verb => ‘GET’, :request => ‘path’, :basic_auth => {:username => ’’, :password => ’’}, :content => ‘content’, :contenttype => ‘text/plain’, :query_string => ’’, :host_header => ’’, :cookie => ’’

### Public Instance methods

connection_completed()

We send the request when we get a connection. AND, we set an instance variable to indicate we passed through here. That allows unbind to know whether there was a successful connection. NB: This naive technique won‘t work when we have to support multiple requests on a single connection.

dispatch_response()
post_init()
receive_data(data)
send_request(args)
unbind()

[Validate]