mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Unable to mock requests to specified url #396
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Yedidyah27 on GitHub (Dec 29, 2021).
Describe the bug
I am trying to set up wiremock for substituting responses for http requests made during testing. When I start the wiremock server I initialize it with a specific url it should intercept. I can see in debug that the wiremock server ignores the url I provided and connects to a random localhost port.
Very simple code snippet:
I am expecting the wiremock server to intercept requests made to the url I specified but it doesnt.
Am I missing anything?
(project is using .net5)
@StefH commented on GitHub (Dec 29, 2021):
Hello @Yedidyah27,
WireMock.Net cannot just listen to that URL.
You need to start WireMock.Net on https://localhost:80443 for example.
And then you need to make sure that you connect from your client application to that https://localhost:80443 url.
@Yedidyah27 commented on GitHub (Dec 29, 2021):
Got it thanks