Hi everyone! New here and I have 2 quick simple qu...
# introduce-yourself
a
Hi everyone! New here and I have 2 quick simple questions. 1. Does WireMock allows to post JSON data and records it on WireMock? 2. Can WireMock protect the API endpoints with API credentials (key and secret) to simulate proper authentication? Thanks for your assistance!
t
Hi Alex, welcome to the WireMock community! 1. Yes, when recording if you send a POST with a request body, that body will be used as matching criteria with the
equalToJson
operator. 2. WireMock OSS doesn’t have this built in, but you can write your own authenticator extension in Java to support whatever scheme you want. WireMock Cloud supports HTTP Basic, header matching and OpenID Connect based authentication as standard.