Skip to content

Commit 536fb7f

Browse files
authored
chore: add default accepts header for rpcv2Cbor (#1427)
1 parent 98d7424 commit 536fb7f

File tree

2 files changed

+3
-1
lines changed
  • private/smithy-rpcv2-cbor/src/protocols
  • smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/protocols/cbor

2 files changed

+3
-1
lines changed

private/smithy-rpcv2-cbor/src/protocols/Rpcv2cbor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,4 +1243,5 @@ const throwDefaultError = withBaseException(__BaseException);
12431243
const SHARED_HEADERS: __HeaderBag = {
12441244
"content-type": "application/cbor",
12451245
"smithy-protocol": "rpc-v2-cbor",
1246+
accept: "application/cbor",
12461247
};

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/protocols/cbor/SmithyRpcV2Cbor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ protected void writeSharedRequestHeaders(GenerationContext context) {
266266
writer.openBlock("const SHARED_HEADERS: __HeaderBag = {", "};", () -> {
267267
writer.write("'content-type': $S,", getDocumentContentType());
268268
writer.write("""
269-
"smithy-protocol": "rpc-v2-cbor"
269+
"smithy-protocol": "rpc-v2-cbor",
270+
"accept": "application/cbor",
270271
""");
271272
});
272273
}

0 commit comments

Comments
 (0)