Class: CoreLibrary::HttpResponseFactory

Inherits:
ResponseFactory
  • Object
show all
Defined in:
lib/apimatic-core/factories/http_response_factory.rb

Overview

Factory to create an instance of HttpResponse

Instance Method Summary collapse

Instance Method Details

#create(_status_code, _reason_phrase, _headers, _raw_body, _request) ⇒ Object

The factory method for creating HttpResponse type.

Parameters:

  • _status_code (Integer)

    The status code returned by the server.

  • _reason_phrase (String)

    The reason phrase returned by the server.

  • _headers (Hash)

    headers The headers sent by the server in the response.

  • _raw_body (String)

    The raw body of the response.

  • _request (HttpRequest)

    The request that resulted in this response.



10
11
12
# File 'lib/apimatic-core/factories/http_response_factory.rb', line 10

def create(_status_code, _reason_phrase, _headers, _raw_body, _request)
  HttpResponse.new(_status_code, _reason_phrase, _headers, _raw_body, _request)
end