A simple hash is returned for each request made by HttpClient with the headers that were given by the server for that request.
Is the transfer encoding chunked?
# File lib/em-http/client.rb, line 50 def chunked_encoding? /chunked/ === self[HttpClient::TRANSFER_ENCODING] end
# File lib/em-http/client.rb, line 58 def compressed? /gzip|compressed|deflate/ === self[HttpClient::CONTENT_ENCODING] end
Length of content as an integer, or nil if chunked/unspecified
# File lib/em-http/client.rb, line 39 def content_length @content_length ||= ((s = self[HttpClient::CONTENT_LENGTH]) && (s =~ /^(\d+)$/)) ? $1.to_i : nil end
E-Tag
# File lib/em-http/client.rb, line 25 def etag self[HttpClient::ETAG] end
# File lib/em-http/client.rb, line 54 def keep_alive? /keep-alive/ === self[HttpClient::KEEP_ALIVE] end
# File lib/em-http/client.rb, line 29 def last_modified self[HttpClient::LAST_MODIFIED] end
Generated with the Darkfish Rdoc Generator 2.