Hi do we any example where we can proxy post calls...
# general
a
Hi do we any example where we can proxy post calls in wiremock? i was referring to documentation available at: https://wiremock.org/docs/proxying/ all example mentioned are for GET calls here.
t
You can set up a mock API in WireMock Cloud, with a POST stub (or any other method you like) then proxy through to that. This is often what I do when testing locally.
a
any documentation or example available?
t
Here’s the getting started doc for Cloud: https://docs.wiremock.io/docs/getting-started/ You can create a basic POST stub very easily, then set up WireMock for proxying as documented and make a POST request to it rather than GET with e.g. Postman.
🙌 1
a
hi @Tom i have a use case where i need to proxy GET call, but my GET api also contains request body. can we achieve this use case. because when i am trying currently api is getting proxied but body is not getting sent to proxied server.
t
It should support this and I seem to remember we fixed it to do so a couple of years ago for exactly this use case
Are you able to set a breakpoint in WireMock to take a look at what it’s doing?
ProxyResponseRenderer
somewhere around line 124 is the relevant part