Class EventMachine::HttpClient
In: lib/em-http/client.rb
Parent: Connection

Methods

Included Modules

EventMachine::Deferrable HttpEncoding

Constants

TRANSFER_ENCODING = "TRANSFER_ENCODING"
CONTENT_ENCODING = "CONTENT_ENCODING"
CONTENT_LENGTH = "CONTENT_LENGTH"
CONTENT_TYPE = "CONTENT_TYPE".freeze
LAST_MODIFIED = "LAST_MODIFIED"
KEEP_ALIVE = "CONNECTION"
SET_COOKIE = "SET_COOKIE"
LOCATION = "LOCATION"
HOST = "HOST"
ETAG = "ETAG"
CRLF = "\r\n"

Attributes

error  [R] 
last_effective_url  [R] 
method  [RW] 
options  [RW] 
redirects  [R] 
response  [R] 
response_header  [R] 
uri  [RW] 

Public Instance methods

close(msg, dns_error = false)

Alias for on_error

determines if a http-proxy should be used with the CONNECT verb

start HTTP request once we establish connection to host

assign disconnect callback for websocket

Response processing

determines if there is enough data in the buffer

assign a headers parse callback

determines if a proxy should be used that uses http-headers as proxy-mechanism

this is the default proxy type if none is specified

Called when part of the body has been read

request failed, invoke errback

request is done, invoke the callback

raw data push from the client (WebSocket) should only be invoked after handshake, otherwise it will inject data into the header exchange

frames need to start with 0x00-0x7f byte and end with an 0xFF byte. Per spec, we can also set the first byte to a value betweent 0x80 and 0xFF, followed by a leading length indicator

determines if a SOCKS5 proxy should be used

assign a stream processing block

[Validate]