I am recording rest api's with wiremock... in my case for SharePoint.
So I set up a recorder:
java -jar wiremock-standalone-2.18.0.jar
Now I go to http://localhost:8080/__admin/recorder/ and I enable recording for my http://sharepointhost.
Now I make some requests to sharepoint rest apis through http://localhost:8080.
But the rest api responses still reference the http://sharepointhost. So when my program uses the API responses that contain URLs then make new requests based on those URLs, it goes to the actual URL instead of the proxy URL and a huge number of my requests don't get recorded.
Is there a way to turn on some sort of reverse proxy or URL pattern string replace so I can avoid this issue? What is the way to do that in my case? Do I need to use the Java variety of the recorder instead of using the standalone?
--
You received this message because you are subscribed to the Google Groups "wiremock-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wiremock-use...@googlegroups.com.
To post to this group, send email to wiremo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wiremock-user/4259fcae-b57d-4a61-9f8e-205d788fcf09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nicholas - there isn't a super easy way to fix this unfortunately. Either you need to post process the recordings, which you can do by manipulating the files, calling the HTTP API or the Java DSL, or you can write a stub mapping transformer that manipulates the URLs as the recording happens.
I agree this is an obvious use case and there should be a built in transformer for it. Like everything, time constraints...