You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Rest::Request::Body

Inherits:
Object
  • Object
show all
Includes:
Seahorse::Model::Shapes
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/rest/request/body.rb

Instance Method Summary collapse

Constructor Details

#initialize(serializer_class, rules) ⇒ Body

Returns a new instance of Body

Parameters:

  • serializer_class (Class)
  • rules (Seahorse::Model::ShapeRef)


10
11
12
13
# File 'gems/aws-sdk-core/lib/aws-sdk-core/rest/request/body.rb', line 10

def initialize(serializer_class, rules)
  @serializer_class = serializer_class
  @rules = rules
end

Instance Method Details

#apply(http_req, params) ⇒ Object

Parameters:



17
18
19
# File 'gems/aws-sdk-core/lib/aws-sdk-core/rest/request/body.rb', line 17

def apply(http_req, params)
  http_req.body = build_body(params)
end