aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.2k stars 853 forks source link

Add x-amzn-query-mode to http header when service has @awsQueryCompatible trait #5707

Closed Fred1155 closed 2 days ago

Fred1155 commented 4 days ago

Motivation and Context

Add hasAWSQueryCompatible field to the marshaller, The SDKs will send an HTTP header x-amzn-query-mode set to true when a service has the @awsQueryCompatible trait.

Modifications

Add a boolean field hasAWSQueryCompatible to JsonProtocolMarshaller and its builder(default set as false) If it is true then add x-amzn-query-mode to the header of the http request

Testing

I added two testcases to validate SDK sends x-amzn-query-mode header when service has @awsQueryCompatible trait

Screenshots (if appropriate)

Types of changes

Checklist

License

sonarcloud[bot] commented 3 days ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Fred1155 commented 3 days ago

Thank you for the comments! Could you please review it again?