Class: Aws::Stubbing::Protocols::RpcV2 Private
- Inherits:
-
Object
- Object
- Aws::Stubbing::Protocols::RpcV2
- Defined in:
- lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb
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.
Instance Method Summary collapse
Instance Method Details
#stub_data(_api, operation, data) ⇒ 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.
9 10 11 12 13 14 15 16 17 |
# File 'lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb', line 9 def stub_data(_api, operation, data) resp = Seahorse::Client::Http::Response.new resp.status_code = 200 resp.headers['Smithy-Protocol'] = 'rpc-v2-cbor' resp.headers['Content-Type'] = 'application/cbor' resp.headers['x-amzn-RequestId'] = 'stubbed-request-id' resp.body = build_body(operation, data) resp end |
#stub_error(error_code) ⇒ 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.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb', line 19 def stub_error(error_code) resp = Seahorse::Client::Http::Response.new resp.status_code = 400 resp.body = Aws::RpcV2.encode( { 'code' => error_code, 'message' => 'stubbed-response-error-message' } ) resp end |