mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
API to record stub while proxying #237
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 @RajnishChhn on GitHub (Dec 18, 2019).
I have been searching for long as to how to record stubs while proxying. I understand that there is one method in which we can pass ProxyAndRecordSettings and tell the server which url needs to be proxied and recorded while starting the FluentMockServer.
Is there any admin api or any other method using which i can give a url to be proxied and recorded?
Something like (from wireMock):
POST /__admin/recordings/start
{
"targetBaseUrl": "http://example.mocklab.io"
}
I have looked through the wiki and couldn't find one. Please forgive me if i have overlooked anything.
@StefH commented on GitHub (Dec 18, 2019):
It's only possible to enable proxing for all requests via ProxyAndRecordSettings when starting.
Or via a single mapping:
It's not possible to enable/configure the global proxy - mode via the admin interface.
@RajnishChhn commented on GitHub (Dec 18, 2019):
I have been trying the mapping approach, but somehow it's not recording anything, neither is it creating a mapping file. The first approach however works fine for me.
I am trying to create a webpage where the user can give the url he/she needs to proxy and record. Any suggestion would help.
@LevYas commented on GitHub (Apr 22, 2020):
I would try to make a very simple asp net core API, which receives the URL and dynamically forms proxy settings and starts the WireMock instance.
@StefH commented on GitHub (Apr 22, 2020):
@LevYas
Solution would be like :
@StefH commented on GitHub (Apr 4, 2022):
@RajnishChhn
did you try latest versions?