Hello there, getting below error whiling invoking ...
# help
d
Hello there, getting below error whiling invoking wiremock endpoint(JSON stub deployed on different service) from a spring framework service A- `springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: "h1Bad Message 400/h1prereason: Bad Request/pre".
Copy code
Service A utilises  org.springframework.http to call APIs.

It is failing at the line of toEntity()-
.retrieve()`
.toEntity(String.class);
Other services like B uses apache camel(routes), from there when it is invoked it is working. Just wanted to understand is this any mock related issue or it do not support http of spring.
STUB:
Copy code
{
  "request": {
    "urlPathPattern": "/wiremock/serv-A/endpoint",
    "method": "POST"
  },
  "response": {
    "status": 200,
    "body": "YJdoX7CUrtquml9eot9BaZIObbXEKxZeaMdF97JQ6Xe5YL+PnHHjT94qJxLKrqGND5H7sRRb3Z1HbUTsG+M/BT3tF+0zxg==",
    "headers": {
      "Content-Type": "text/plain"
    }
  }
}
body returns the encrypted response.
l
There shouldn't be an issue with the stub you posted but without a little more information about the service that is calling the stub it is difficult to tell. Are you using the official wiremock spring integration ? - https://github.com/wiremock/wiremock-spring-boot