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"
KEEP_ALIVE = "CONNECTION"
SET_COOKIE = "SET_COOKIE"
LOCATION = "LOCATION"
HOST = "HOST"
CRLF = "\r\n"

Attributes

errors  [R] 
method  [RW] 
options  [RW] 
response  [R] 
response_header  [R] 
uri  [RW] 

Public Instance methods

start HTTP request once we establish connection to host

Response processing

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

assign a stream processing block

[Validate]