Method: Bandwidth::HttpRequest#initialize

Defined in:
lib/bandwidth/http/http_request.rb

#initialize(http_method, query_url, headers: {}, parameters: {}) ⇒ HttpRequest

The constructor.

Parameters:

  • The (HttpMethodEnum)

    HTTP method.

  • The (String)

    URL to send the request to.

  • The (Hash, Optional)

    headers for the HTTP Request.

  • The (Hash, Optional)

    parameters for the HTTP Request.



17
18
19
20
21
22
23
24
25
# File 'lib/bandwidth/http/http_request.rb', line 17

def initialize(http_method,
               query_url,
               headers: {},
               parameters: {})
  @http_method = http_method
  @query_url = query_url
  @headers = headers
  @parameters = parameters
end