Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ else if (shape.isRequest()) {
Map<String, String> cborSpecificHeaders = new HashMap<>();
cborSpecificHeaders.put("Aws::Http::ACCEPT_HEADER", "Aws::CBOR_CONTENT_TYPE");
cborSpecificHeaders.put("Aws::Http::SMITHY_PROTOCOL_HEADER", "Aws::RPC_V2_CBOR");
if(shape.hasMembers()){
cborSpecificHeaders.put("Aws::Http::CONTENT_TYPE_HEADER", "Aws::CBOR_CONTENT_TYPE");
}
context.put("requestSpecificHeaders", cborSpecificHeaders);
template = velocityEngine.getTemplate("/com/amazonaws/util/awsclientgenerator/velocity/cpp/cbor/CborRequestSource.vm", StandardCharsets.UTF_8.name());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
Aws::Http::HeaderValueCollection ${typeInfo.className}::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
#if($operation.hasRequest())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit - can we move this to above the for loop so there is no git diff on unchanged clients?

headers.emplace(Aws::Http::CONTENT_TYPE_HEADER, Aws::CBOR_CONTENT_TYPE);
#end
#foreach($headerEntry in $requestSpecificHeaders.entrySet())
headers.emplace(${headerEntry.key}, ${headerEntry.value});
#end
Expand Down