Class: Aws::Json::SimpleBodyHandler Private

Inherits:
Seahorse::Client::Handler show all
Defined in:
lib/aws-sdk-core/json/simple_body_handler.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This plugin performs two trivial translations:

  • The request parameters are serialized as JSON for the request body

  • The response body is deserialized as JSON for the response data

No attempt is made to extract errors from the HTTP response body. Parsing the response only happens for a successful response.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Handler

#handler

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Handler

#initialize, #inspect

Constructor Details

This class inherits a constructor from Seahorse::Client::Handler

Instance Method Details

#call(context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
17
18
19
20
# File 'lib/aws-sdk-core/json/simple_body_handler.rb', line 14

def call(context)
  build_json(context)
  @handler.call(context).on_success do |response|
    response.error = nil
    response.data = parse_json(context)
  end
end