Wiremock post data

Handwritten on 16 Feb 2022

Wiremock

Run wiremock with a docker container

docker run -it --rm \
  -p 8081:8080 \
  --name wiremock \
  wiremock/wiremock:2.32.0

Serve data

Serve JSON data for a GET request http://localhost:8081/sample-get:

curl -X POST \
--data '{ "request": { "url": "/sample-get", "method": "GET" }, "response": { "status": 200, "headers": { "Content-Type": "application/json" }, "jsonBody": [{ "prop": "value"}, { "prop": "value-2"}]  }}' \
http://localhost:8081/__admin/mappings/new
Logo Adis.me

© 2022 Handcrafted in Nijmegen, The Netherlands