class EventMachine::Protocols::HttpClient
def self.request( args = {} )
(**args)-
:cookie(String) -- Cookies to set -
:host_header(String) -- The host header to set -
:query_string(String) -- The query string -
:contenttype(String) -- The content type (e.g. text/plain) -
:content(String) -- The request content -
:basic_auth(Hash) -- The basic auth credentials (:username and :password) -
:request(String) -- The request path -
:verb(String) -- The request type [GET | POST | DELETE | PUT] -
:port(Integer) -- The port to connect too -
:host(String) -- The host IP/DNS name
Parameters:
-
args(Hash) -- The request arguments
def self.request( args = {} ) args[:port] ||= 80 EventMachine.connect( args[:host], args[:port], self ) {|c| # According to the docs, we will get here AFTER post_init is called. c.instance_eval {@args = args} } end