Skip to content

Commit 4f3d41e

Browse files
authored
fix: populate content-type header for all event messages (#3760)
1 parent 19fddb2 commit 4f3d41e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,7 @@ const serializeAws_restJson1AudioInputEvent_event = (input: AudioInputEvent, con
10371037
headers: {
10381038
":event-type": { type: "string", value: "AudioInputEvent" },
10391039
":message-type": { type: "string", value: "event" },
1040+
":content-type": { type: "string", value: "application/json" },
10401041
},
10411042
body: new Uint8Array(),
10421043
};
@@ -1052,6 +1053,7 @@ const serializeAws_restJson1ConfigurationEvent_event = (
10521053
headers: {
10531054
":event-type": { type: "string", value: "ConfigurationEvent" },
10541055
":message-type": { type: "string", value: "event" },
1056+
":content-type": { type: "string", value: "application/json" },
10551057
},
10561058
body: new Uint8Array(),
10571059
};
@@ -1067,6 +1069,7 @@ const serializeAws_restJson1DisconnectionEvent_event = (
10671069
headers: {
10681070
":event-type": { type: "string", value: "DisconnectionEvent" },
10691071
":message-type": { type: "string", value: "event" },
1072+
":content-type": { type: "string", value: "application/json" },
10701073
},
10711074
body: new Uint8Array(),
10721075
};
@@ -1079,6 +1082,7 @@ const serializeAws_restJson1DTMFInputEvent_event = (input: DTMFInputEvent, conte
10791082
headers: {
10801083
":event-type": { type: "string", value: "DTMFInputEvent" },
10811084
":message-type": { type: "string", value: "event" },
1085+
":content-type": { type: "string", value: "application/json" },
10821086
},
10831087
body: new Uint8Array(),
10841088
};
@@ -1094,6 +1098,7 @@ const serializeAws_restJson1PlaybackCompletionEvent_event = (
10941098
headers: {
10951099
":event-type": { type: "string", value: "PlaybackCompletionEvent" },
10961100
":message-type": { type: "string", value: "event" },
1101+
":content-type": { type: "string", value: "application/json" },
10971102
},
10981103
body: new Uint8Array(),
10991104
};
@@ -1106,6 +1111,7 @@ const serializeAws_restJson1TextInputEvent_event = (input: TextInputEvent, conte
11061111
headers: {
11071112
":event-type": { type: "string", value: "TextInputEvent" },
11081113
":message-type": { type: "string", value: "event" },
1114+
":content-type": { type: "string", value: "application/json" },
11091115
},
11101116
body: new Uint8Array(),
11111117
};

clients/client-transcribe-streaming/src/protocols/Aws_restJson1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ const serializeAws_restJson1AudioEvent_event = (input: AudioEvent, context: __Se
566566
headers: {
567567
":event-type": { type: "string", value: "AudioEvent" },
568568
":message-type": { type: "string", value: "event" },
569+
":content-type": { type: "string", value: "application/octet-stream" },
569570
},
570571
body: new Uint8Array(),
571572
};

0 commit comments

Comments
 (0)