Dear all,
I'm running the standalone Wiremock on my localhost and connecting to it from within my program (cucumber JVM tests) using WireMock.configureFor(localhost, port). It is working fine and can connect to the WireMock instance. However, I realised the client can also connect to the local WireMock instance without configuring i.e. without WireMock.configureFor(localhost, post). And I can also connect to the instance from outside program like Postman.
Could you please tell me why the client can connect to the localhost wiremock instance even without configuring? Is configuring only required for remote instance?
I refer to this paragraph in the documentation:
Configuring WireMock using the Java clientThe WireMock Java API can be used against a running server on a different host if required. If you’re only planning to configure a single remote instance from within your program you can configure the static DSL to point to it:
WireMock.configureFor("my.remote.host", 8000);
// or for HTTPS
WireMock.configureFor("https", "my.remote.host", 8443);
Look forward to hearing from you.
Many thanks,
Waqas