Hello everyone, I have a question related to <Mult...
# general
k
Hello everyone, I have a question related to Multi-domain Mocking. It’s mentioned that in the examples only in java, is it available for other languages or only java 🤔 ? for example could it be configured with json stubs only?
r
It's purely a matter of how you start WireMock, so it's available to anyone. Start it as so:
java -jar wiremock-standalone-2.35.0.jar --enable-browser-proxying
Or in docker:
Copy code
docker run -it --rm \
  -p 8080:8080 \
  wiremock/wiremock:2.35.0 \
  --enable-browser-proxying
Stubs can of course be created using the JSON API as usual, using header matching. Then it's a matter of configuring
<http://localhost:8080>
as the proxy for whatever client you are using. There are docs here on browser (or "forward") proxying: https://wiremock.org/docs/proxying/ - search for "Running as a browser proxy".
k
Thanks @Rob Elliot for your answer.
Then it’s a matter of configuring
<http://localhost:8080>
as the proxy for whatever client you are using.
I see, and the example mentioned with Java, and if I am using any other language I need to search how to configure it to point to
<http://localhost:8080>
as a proxy, right?
r
Yes
For instance in curl you'd use
curl -x <http://localhost:8080>
<http://www.example.com>
🙏 1