Skip to content

Commit e34c412

Browse files
trivikrsrchase
authored andcommitted
Add hostname after protocol
1 parent eb98776 commit e34c412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ private void generateOperationSerializer(
227227
// them. The client's resolved endpoint can be default one or supplied by users.
228228
writer.write("const {hostname, protocol = \"https\", port} = await context.endpoint();");
229229
writer.openBlock("return new $T({", "});", requestType, () -> {
230+
writer.write("protocol,");
230231
if (hasHostPrefix) {
231232
writer.write("hostname: resolvedHostname,");
232233
} else {
233234
writer.write("hostname,");
234235
}
235-
writer.write("protocol,");
236236
writer.write("port,");
237237
writer.write("method: $S,", trait.getMethod());
238238
writer.write("headers,");

0 commit comments

Comments
 (0)