Skip to content

Commit 20dd588

Browse files
author
awstools
committed
feat(client-application-insights): This release adds Smithy RPC v2 CBOR as an additional protocol alongside the existing AWS JSON 1.1. The SDK will prioritize its most performant protocol.
1 parent a4dd3de commit 20dd588

2 files changed

Lines changed: 5450 additions & 5410 deletions

File tree

clients/client-application-insights/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,45 @@ const params = { /** input parameters */ };
6262
const command = new ListApplicationsCommand(params);
6363
```
6464

65+
#### Supported Message Protocols
66+
67+
This client supports multiple protocols.
68+
69+
The default for this client is **AWS JSON (RPC) 1.1**.
70+
71+
We have selected this default based on our evaluation of the
72+
performance characteristics of this protocol format in JavaScript. You don't need to change it,
73+
but you have the option to do so, for example to support existing integrations or tests.
74+
Selecting a non-default protocol changes the format
75+
of the data sent over the network, but does not affect how you interact with the
76+
client using JavaScript objects.
77+
78+
Install the `@aws-sdk/config` package to access alternate protocols.
79+
80+
See [AWS Protocols](https://smithy.io/2.0/aws/protocols/index.html) for more information.
81+
82+
##### AWS JSON (RPC) 1.1
83+
84+
This protocol uses JSON payloads.
85+
```js
86+
import { AwsJson1_1Protocol } from "@aws-sdk/config/protocol";
87+
88+
const client = new ApplicationInsightsClient({
89+
protocol: AwsJson1_1Protocol
90+
});
91+
```
92+
93+
##### Smithy RPC v2 CBOR
94+
95+
This protocol uses CBOR payloads.
96+
```js
97+
import { AwsSmithyRpcV2CborProtocol } from "@aws-sdk/config/protocol";
98+
99+
const client = new ApplicationInsightsClient({
100+
protocol: AwsSmithyRpcV2CborProtocol
101+
});
102+
```
103+
65104
#### Async/await
66105

67106
We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)

0 commit comments

Comments
 (0)