Module | FTW::Protocol |
In: |
lib/ftw/protocol.rb
lib/ftw/protocol.rb |
This module provides web protocol handling as a mixin.
A shorthand for discarding the body of a request or response.
This is the same as:
foo.read_body { |c| }
A shorthand for discarding the body of a request or response.
This is the same as:
foo.read_body { |c| }
Read the body of this message. The block is called with chunks of the response as they are read in.
This method is generally only called by http clients, not servers.
If no block is given, the entire response body is returned as a string.
Read the body of this message. The block is called with chunks of the response as they are read in.
This method is generally only called by http clients, not servers.
If no block is given, the entire response body is returned as a string.
Read the body of this message. The block is called with chunks of the response as they are read in.
This method is generally only called by http clients, not servers.
Read the body of this message. The block is called with chunks of the response as they are read in.
This method is generally only called by http clients, not servers.
Read the length bytes from the body. Yield each chunk read to the block given. This method is generally only called by http clients, not servers.
Read the length bytes from the body. Yield each chunk read to the block given. This method is generally only called by http clients, not servers.
Read an HTTP message from a given connection
This method blocks until a full http message header has been consumed (request or response)
The body of the message, if any, will not be consumed, and the read position for the connection will be left at the end of the message headers.
The ‘connection’ object must respond to read(timeout) and pushback(string)
Read an HTTP message from a given connection
This method blocks until a full http message header has been consumed (request or response)
The body of the message, if any, will not be consumed, and the read position for the connection will be left at the end of the message headers.
The ‘connection’ object must respond to read(timeout) and pushback(string)