Method: ApimaticCalculator::BaseController#new_request_builder

Defined in:
lib/apimatic_calculator/controllers/base_controller.rb

#new_request_builder(http_method, path, server) ⇒ RequestBuilder

Creates a new instance of the request builder.

Parameters:

  • http_method (HttpMethodEnum)

    The HTTP method to use in the request.

  • path (String)

    The endpoint path to use in the request.

  • server (String)

    The server to extract the base uri for the request.

Returns:

  • (RequestBuilder)

    The instance of RequestBuilder.



42
43
44
45
46
47
# File 'lib/apimatic_calculator/controllers/base_controller.rb', line 42

def new_request_builder(http_method, path, server)
  RequestBuilder.new
                .http_method(http_method)
                .path(path)
                .server(server)
end