File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed
main/kotlin/software/amazon/smithy/swift/codegen/integration/middlewares/handlers Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -111,17 +111,11 @@ class HttpBodyMiddleware(
111111 renderEncodedBodyAddedToRequest(bodyDeclaration, dataDeclaration)
112112 }
113113 writer.indent()
114- writer.openBlock(" if encoder is JSONEncoder {" , " } else if encoder is XMLEncoder { " ) {
114+ writer.openBlock(" if encoder is JSONEncoder {" , " }" ) {
115115 writer.write(" // Encode an empty body as an empty structure in JSON" )
116116 writer.write(" let \$ L = \" {}\" .data(using: .utf8)!" , dataDeclaration)
117117 renderEncodedBodyAddedToRequest(bodyDeclaration, dataDeclaration)
118118 }
119- writer.indent()
120- writer.write(" // Encode an empty body as an empty string in XML" )
121- writer.write(" let \$ L = \"\" .data(using: .utf8)!" , dataDeclaration)
122- renderEncodedBodyAddedToRequest(bodyDeclaration, dataDeclaration)
123- writer.dedent()
124- writer.write(" }" )
125119 writer.dedent()
126120 writer.write(" }" )
127121 }
Original file line number Diff line number Diff line change @@ -160,11 +160,6 @@ class HttpBodyMiddlewareTests {
160160 let payload1data = "{}".data(using: .utf8)!
161161 let payload1body = ClientRuntime.HttpBody.data(payload1data)
162162 input.builder.withBody(payload1body)
163- } else if encoder is XMLEncoder {
164- // Encode an empty body as an empty string in XML
165- let payload1data = "".data(using: .utf8)!
166- let payload1body = ClientRuntime.HttpBody.data(payload1data)
167- input.builder.withBody(payload1body)
168163 }
169164 }
170165 } catch let err {
You can’t perform that action at this time.
0 commit comments