Class: AWS::Core::RESTRequestBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/core/rest_request_builder.rb

Overview

Given a hash of request options, a REST::RequestHandler can populate a Core::Http::Request object.

Instance Method Summary collapse

Instance Method Details

#populate_request(request, params) ⇒ Object

Populates a Http::Request with the following:

  • HTTP method

  • URI

  • headers

  • body

Parameters:

  • request (Http::Request)
  • params (Hash)

    The hash of request options provided to the client request method. This will be used to populate the headers, uri and body.

Raises:

  • (ArgumentError)

    Raises ArgumentError when any of the request options are invalid (wrong type, missing, unknown, etc).



59
60
61
62
63
64
65
# File 'lib/aws/core/rest_request_builder.rb', line 59

def populate_request request, params
  params = @validator.validate!(params)
  populate_method(request)
  populate_uri(request, params)
  populate_headers(request, params)
  populate_body(request, params)
end