Class: Opensaz::HTTPResponse

Inherits:
HTTPRequest show all
Defined in:
lib/opensaz/http_response.rb

Constant Summary

Constants inherited from HTTPRequest

Opensaz::HTTPRequest::CRLF, Opensaz::HTTPRequest::SEPERATOR

Instance Method Summary collapse

Methods inherited from HTTPRequest

#body, #initialize

Constructor Details

This class inherits a constructor from Opensaz::HTTPRequest

Instance Method Details

#headersObject



3
4
5
6
7
# File 'lib/opensaz/http_response.rb', line 3

def headers
  first_line = headers_str.split(CRLF)[0]
  following_lines = headers_str.split(CRLF)[1..-1]
  get_status_line(first_line).merge(get_headers(following_lines))
end