https://linen.dev logo
#wiremock-java
Title
# wiremock-java
r

Russ Garratt

01/17/2023, 1:06 PM
Has anyone had any issues with multipart/form-data please? (with Transfer-Encoding: chunked)?? Using spring boot 3.0.1, wiremock 3 beta 2, kotlin Have an apache client 4.5.14 on jdk 17.05 called from a 3rd party SDK I can't really control this as it is part of our http client / external dependency Spring Boot annotation: @AutoConfigureWireMock( port = 8089 ) stubFor( any(urlMatching(attributeImportUrl)) .willReturn( aResponse() .withStatus(201) .withBody(responseBody) ) ) When I run the unit test, it just times out, Whilst it is timing out, I hit a postman URL and get the response: <h1>Bad Message 400</h1><pre>reason: Transfer-Encoding and Content-Length</pre> Below are the postman params I pulled/used from debugging httpclient headers: Transfer-Encoding: chunked Authorization: frontend-key X-Mirakl-Sdk-Version: 6.13.0 X-Mirakl-Sdk-Module: 5f721a44-f50f-4661-a22c-049a31bcb17a Accept: application/json User-Agent: PostmanRuntime/7.28.4 Postman-Token: 38a49f0f-5df0-418f-bd2c-b401dbfff0e7 Host: localhost:8089 Accept-Encoding: gzip, deflate, br Connection: keep-alive Content-Type: multipart/form-data; boundary=--------------------------216688050540449012799122 Content-Length: 1259 But this is apache client it seems, Any help appreciated please? Thanks, Russ
3 Views