each_capitalized

each_capitalized() Instance Public methods As for each_header, except the keys are provided in capitalized form. Note that header names are capitalized systematically; capitalization may not match that used by the remote HTTP server in its response. canonical_each

each_capitalized_name

each_capitalized_name() Instance Public methods Iterates through the header names in the header, passing capitalized header names to the code block. Note that header names are capitalized systematically; capitalization may not match that used by the remote HTTP server in its response.

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

each_key

each_key() Instance Public methods Alias for: each_name

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_value

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

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

form_data=

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

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

initialize_http_header

initialize_http_header(initheader) Instance Public methods