File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ class AwsJsonHttpBindingResolver(
79
79
80
80
override fun errorResponseBindings (errorShape : ToShapeId ): List <HttpBindingDescriptor > = bindings(errorShape)
81
81
82
- // TODO This won't set the correct `Content-Type` for event streaming operations!
83
82
override fun requestContentType (operationShape : OperationShape ): String =
84
83
" application/x-amz-json-${awsJsonVersion.value} "
85
84
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ package software.amazon.smithy.rust.codegen.core.smithy.protocols
7
7
8
8
import software.amazon.smithy.codegen.core.CodegenException
9
9
import software.amazon.smithy.model.Model
10
+ import software.amazon.smithy.model.shapes.MemberShape
10
11
import software.amazon.smithy.model.shapes.OperationShape
11
12
import software.amazon.smithy.model.shapes.ToShapeId
12
13
import software.amazon.smithy.model.traits.TimestampFormatTrait
@@ -25,7 +26,7 @@ import software.amazon.smithy.rust.codegen.core.util.expectTrait
25
26
import software.amazon.smithy.rust.codegen.core.util.isStreaming
26
27
import software.amazon.smithy.rust.codegen.core.util.outputShape
27
28
28
-
29
+ // TODO Rename these to RpcV2Cbor
29
30
class RpcV2HttpBindingResolver (
30
31
private val model : Model ,
31
32
) : HttpBindingResolver {
@@ -75,6 +76,9 @@ class RpcV2HttpBindingResolver(
75
76
}
76
77
return requestContentType(operationShape)
77
78
}
79
+
80
+ override fun eventStreamMessageContentType (memberShape : MemberShape ): String? =
81
+ ProtocolContentTypes .eventStreamMemberContentType(model, memberShape, " application/cbor" )
78
82
}
79
83
80
84
/* *
You can’t perform that action at this time.
0 commit comments