WireMock.Net
WireMock.Net copied to clipboard
Does WireMock support mocking HTTPS requests?
From I can see is that proxy catches a request BUT it's a CONNECT HTTP method which later results in a response to a client "No mapping found".
Same question. My example: I have WebApi which from inside the code calls external url which is https. My WebAPI is setup to proxy all requests to wiremock server. So wiremock will catch the request but it will return "No mapping found". If I will remove all mapping criteria, I can see in RequestMessage that it's CONNECT.
@wirtual11 and @suszi88
It is possible to run WireMock.Net at https
.
Did you check this page? https://github.com/WireMock-Net/WireMock.Net/wiki/Using-HTTPS-%28SSL%29
Hi @StefH , thank you for your reply, sorry I didn't reply earlier, I had to miss your comment as was on holidays. I saw the page and I set it up before but this is not what I asked for. What I asked is: I have api which need to send request to https url, let say my api is creating request and senting it to https://SomeValidUrl.com. Now I cannot change this url, what I wanted to do is to have proxy which will take my request with original url and sent it to my mock server https://localhost:8080. So I'm proxing my request to witemock. Now I was able to retrieve it but probably due to https character I cannot read the content of request. Now given I have valid cert of api which is sending this, can it be setup in wiremock? I have no problem if same setup is with http://SomeValidUrl.com url. Thanks
@suszi88 Did you view these pages?
- https://github.com/WireMock-Net/WireMock.Net/wiki/Using-HTTPS-(SSL)
- https://github.com/WireMock-Net/WireMock.Net/wiki/Settings#certificatesettings
@suszi88 Did you have time to read the wiki pages mentioned in my last comment?
@suszi88 I'll close this issue.
In case you still have questions, comment here or open a new specific issue.