Skip to content

Commit

Permalink
chore: add default accepts header for rpcv2Cbor (smithy-lang#1427)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Oct 16, 2024
1 parent 98d7424 commit 536fb7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions private/smithy-rpcv2-cbor/src/protocols/Rpcv2cbor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1243,4 +1243,5 @@ const throwDefaultError = withBaseException(__BaseException);
const SHARED_HEADERS: __HeaderBag = {
"content-type": "application/cbor",
"smithy-protocol": "rpc-v2-cbor",
accept: "application/cbor",
};
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ protected void writeSharedRequestHeaders(GenerationContext context) {
writer.openBlock("const SHARED_HEADERS: __HeaderBag = {", "};", () -> {
writer.write("'content-type': $S,", getDocumentContentType());
writer.write("""
"smithy-protocol": "rpc-v2-cbor"
"smithy-protocol": "rpc-v2-cbor",
"accept": "application/cbor",
""");
});
}
Expand Down

0 comments on commit 536fb7f

Please sign in to comment.