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 51 51: def chunked_encoding? 52: /chunked/ === self[HttpClient::TRANSFER_ENCODING] 53: end
# File lib/em-http/client.rb, line 59 59: def compressed? 60: /gzip|compressed|deflate/ === self[HttpClient::CONTENT_ENCODING] 61: end
Length of content as an integer, or nil if chunked/unspecified
# File lib/em-http/client.rb, line 40 40: def content_length 41: @content_length ||= ((s = self[HttpClient::CONTENT_LENGTH]) && 42: (s =~ /^(\d+)$/)) ? $1.to_i : nil 43: end
E-Tag
# File lib/em-http/client.rb, line 25 25: def etag 26: self["ETag"] 27: end
# File lib/em-http/client.rb, line 55 55: def keep_alive? 56: /keep-alive/ === self[HttpClient::KEEP_ALIVE] 57: end
# File lib/em-http/client.rb, line 29 29: def last_modified 30: time = self["Last-Modified"] 31: Time.parse(time) if time 32: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.