main_type

main_type() Instance Public methods Returns a content type string such as âtextâ. This method returns nil if Content-Type: header field does not exist.

key?

key?(key) Instance Public methods true if key header exists.

initialize_http_header

initialize_http_header(initheader) Instance Public methods

get_fields

get_fields(key) Instance Public methods Ruby 1.8.3 Returns an array of header field strings corresponding to the case-insensitive key. This method allows you to get duplicated header fields without any processing. See also []. p response.get_fields('Set-Cookie') #=> ["session=al98axx; expires=Fri, 31-Dec-1999 23:58:23", "query=rubyscript; expires=Fri, 31-Dec-1999 23:58:23"] p response['Set-Cookie'] #=> "session=al98axx; expires=Fri, 31-Dec-1999 23:58:23, query

form_data=

form_data=(params, sep = '&') Instance Public methods Alias for: set_form_data

fetch

fetch(key, *args) Instance Public methods Returns the header field corresponding to the case-insensitive key. Returns the default value args, or the result of the block, or raises an IndexError if there's no header field named key See Hash#fetch

each_value

each_value() Instance Public methods Iterates through header values, passing each value to the code block.

each_name

each_name() Instance Public methods Iterates through the header names in the header, passing each header name to the code block. each_key

each_key

each_key() Instance Public methods Alias for: each_name

each_header

each_header() Instance Public methods Iterates through the header names and values, passing in the name and value to the code block supplied. Example: response.header.each_header {|key,value| puts "#{key} = #{value}" } each