Just started learning about mocks and I am trying to figure it out.
I have wiremock in Docker and mockServer in Docker.(mock-server.com).
Each has simple test requests. /hello returns the string hello. Individually, everything works.
I’m trying to figure out how to make it so that when I access /hello mockServer, mockServer redirects (forwards) the request to /hello wiremock so that the response comes back from wiremock.
There is an example in the mockServer documentation how to create a forward request
{
"httpRequest": {
"path": "/some/path"
},
"httpForward": {
"host": "mock-server.com",
"port": 80,
"scheme": "HTTP"
}
}
But I don’t understand how to apply it.
Both have localhost address like:
http://localhost:3001/hellowiremock
http://localhost:3000/hellomockserver
Tried the example from the documentation – didn’t work.