I was able to implement the basic setup of wire mock by using:
public void mock(){
WireMockServer wireMockServer = new WireMockServer(443)
wireMockServer.start()
configureFor("localhost", 443)
stubFor(post(urlEqualTo("/path/link")).willReturn(aResponse().withBody("hello world")).withStatus(200))
}
This works well for any resource running on localhost port 8080 like this http://localhost:8080/path/link.
what if I want to mock for a hostname like https://apigeew-uat.company.net/path/link that doesn't have any port specified. How will the port be determined here?
what is configureFor used for?. I understand we specify the port the wiremock server to run but don't quiet understand configure for.