Method: Restify::Response#initialize
- Defined in:
- lib/restify/response.rb
#initialize(request, 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.
69 70 71 72 73 74 75 76 |
# File 'lib/restify/response.rb', line 69 def initialize(request, code, headers, body) @request = request @code = code @status = STATUS_CODE_TO_SYMBOL[code] @headers = headers @body = body @message = Rack::Utils::HTTP_STATUS_CODES[code] end |