WireMock.Net icon indicating copy to clipboard operation
WireMock.Net copied to clipboard

Proxy all requests - even a repeated one

Open DarthXerox opened this issue 4 years ago • 3 comments

Hey, hopefully I didn't miss some hidden feature or a different way to solve this problem:

Repeated request problem I'm sending a sequence of requests from a client to my webapi, some of these requests repeat. The problem occurs when the same request is received the second time - it is NOT sent to the Url, only the previously saved response is sent back. I do not need to record the request again, only that the Url receives the request again, without it the rest of the requests are invalid.

Possible solution Adding a ProxyAll = true option in ProxyAndRecordSettings which would tell the server to proxy ALL requests to the Url

Is your feature request supported by WireMock (java version)? Please provide details. Yes, by --proxy-all command line option in http://wiremock.org/docs/running-standalone/

Thanks for help

DarthXerox avatar Mar 15 '21 12:03 DarthXerox

Hello @DarthXerox, So you want to save only the first proxied mapping to the internal mapping + file?

StefH avatar Mar 19 '21 13:03 StefH

Hello,

Hello @DarthXerox, So you want to save only the first proxied mapping to the internal mapping + file?

Is it possible to have that functionality or maybe it has been already added?

BR

marspox avatar Jul 13 '22 09:07 marspox

@marspox It's not yet implemented.

StefH avatar Jul 13 '22 14:07 StefH

We do faced the same issue couple of times, would like to work on it. And the implementation idea is to have a ProxyAll flag and if it is true then set the proxy priority as lowest integer value so that proxy takes the precedence over existing in-memory mapping.

sameena-ops avatar Dec 11 '23 10:12 sameena-ops

https://github.com/WireMock-Net/WireMock.Net/pull/1038

StefH avatar Dec 11 '23 12:12 StefH