Method: Restify::Response#initialize
- Defined in:
- lib/restify/response.rb
#initialize(request, uri, code, headers, body) ⇒ Response
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Response.
75 76 77 78 79 80 81 82 83 |
# File 'lib/restify/response.rb', line 75 def initialize(request, uri, code, headers, body) @request = request @uri = uri @code = code @status = STATUS_CODE_TO_SYMBOL[code] @headers = headers @body = body = Rack::Utils::HTTP_STATUS_CODES[code] end |