Class: AWS::Core::RESTRequestBuilder
- Inherits:
-
Object
- Object
- AWS::Core::RESTRequestBuilder
- 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
-
#populate_request(request, request_options) ⇒ Http::Request
Populates an http request object with params in the uri, headers, and body.
Instance Method Details
#populate_request(request, request_options) ⇒ Http::Request
Populates an http request object with params in the uri, headers, and body.
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/aws/core/rest_request_builder.rb', line 43 def populate_request request, params = @validator.validate!() request.http_method = @http[:verb] request.uri = extract_uri(params) extract_headers(params).each_pair do |header_name, header_value| request.headers[header_name] = header_value end request.body = build_body(params) request end |