Does WireMock support mocking HTTPS requests? #389

Closed
opened 2025-12-29 15:22:33 +01:00 by adam · 6 comments
Owner

Originally created by @wirtual11 on GitHub (Nov 25, 2021).

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".

Originally created by @wirtual11 on GitHub (Nov 25, 2021). 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".
adam added the question label 2025-12-29 15:22:33 +01:00
adam closed this issue 2025-12-29 15:22:33 +01:00
Author
Owner

@suszi88 commented on GitHub (Nov 26, 2021):

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.

@suszi88 commented on GitHub (Nov 26, 2021): 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.
Author
Owner

@StefH commented on GitHub (Feb 27, 2022):

@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

@StefH commented on GitHub (Feb 27, 2022): @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
Author
Owner

@suszi88 commented on GitHub (Apr 22, 2022):

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 commented on GitHub (Apr 22, 2022): 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
Author
Owner
@StefH commented on GitHub (Jun 9, 2022): @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
Author
Owner

@StefH commented on GitHub (Sep 19, 2022):

@suszi88
Did you have time to read the wiki pages mentioned in my last comment?

@StefH commented on GitHub (Sep 19, 2022): @suszi88 Did you have time to read the wiki pages mentioned in my last comment?
Author
Owner

@StefH commented on GitHub (Oct 12, 2022):

@suszi88
I'll close this issue.

In case you still have questions, comment here or open a new specific issue.

@StefH commented on GitHub (Oct 12, 2022): @suszi88 I'll close this issue. In case you still have questions, comment here or open a new specific issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#389