| Class | EventMachine::Protocols::HttpClient |
| In: |
lib/em/protocols/httpclient.rb
|
| Parent: | Connection |
Note: This class is deprecated and will be removed. Please use EM-HTTP-Request instead.
@example
EventMachine.run {
http = EventMachine::Protocols::HttpClient.request(
:host => server,
:port => 80,
:request => "/index.html",
:query_string => "parm1=value1&parm2=value2"
)
http.callback {|response|
puts response[:status]
puts response[:headers]
puts response[:content]
}
}
| MaxPostContentLength | = | 20 * 1024 * 1024 |
@param args [Hash] The request arguments @option args [String] :host The host IP/DNS name @option args [Integer] :port The port to connect too @option args [String] :verb The request type [GET | POST | DELETE | PUT] @option args [String] :request The request path @option args [Hash] :basic_auth The basic auth credentials (:username and :password) @option args [String] :content The request content @option args [String] :contenttype The content type (e.g. text/plain) @option args [String] :query_string The query string @option args [String] :host_header The host header to set @option args [String] :cookie Cookies to set