Parent

Coolio::HttpResponseHeader

A simple hash is returned for each request made by HttpClient with the headers that were given by the server for that request.

Attributes

http_reason[RW]

The reason returned in the http response ("OK","File not found",etc.)

http_status[RW]

The status code (as a string!)

http_version[RW]

The HTTP version returned.

Public Instance Methods

chunked_encoding?() click to toggle source

Is the transfer encoding chunked?

# File lib/cool.io/http_client.rb, line 34
def chunked_encoding?
  /chunked/ === self[HttpClient::TRANSFER_ENCODING]
end
content_length() click to toggle source

Length of content as an integer, or nil if chunked/unspecified

# File lib/cool.io/http_client.rb, line 29
def content_length
  Integer(self[HttpClient::CONTENT_LENGTH]) rescue nil
end
status() click to toggle source

HTTP response status as an integer

# File lib/cool.io/http_client.rb, line 24
def status
  Integer(http_status) rescue nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.