8000 send opt-in query-compatible header where applicable (#2891) · aws/aws-sdk-go-v2@1d989f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d989f3

Browse files
authored
send opt-in query-compatible header where applicable (#2891)
1 parent 5d0eb23 commit 1d989f3

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "ccc0add5-b568-413f-b8cf-09c94a4c7fa7",
3+
"type": "feature",
4+
"description": "Send opt-in query-compatible header for applicable services.",
5+
"modules": [
6+
"service/sqs"
7+
]
8+
}

codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsJsonRpc1_0.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ protected Set<StructureShape> generateErrorShapes(
6161
}
6262
}
6363

64+
@Override
65+
protected void writeDefaultHeaders(GenerationContext context, OperationShape operation, GoWriter writer) {
66+
super.writeDefaultHeaders(context, operation, writer);
67+
if (isAwsQueryCompatibleTraitFound(context)) {
68+
writer.write("httpBindingEncoder.SetHeader(\"X-Amzn-Query-Mode\").Boolean(true)");
69+
}
70+
}
71+
6472
@Override
6573
protected void deserializeError(GenerationContext context, StructureShape shape) {
6674
GoWriter writer = context.getWriter().get();

service/sqs/serializers.go

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0