-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forward callbacks in capture mode #1161
Comments
I have some doubts. How remote service will proxy the request to your hoverfly instance? Is that service you are owning? How we will identify which callback refers to which request? This won't be generic thing as no remote service will proxy request to our hoverfly instance so there is no point of adding that functionality just for very specific use case. |
Thanks guys, there are some good ideas and valid concerns here. I think @hertznsk is suggesting a webhook capture and simulate feature which can probably utilize the existing
It's not gonna be a proxy, because remote server can only deliver a webhook to an endpoint, so Hoverfly needs to run a server to receive the request, and then replay it through a proxy to the user's application, the proxy will capture the request and response data.
This is an issue, because webhook is asynchronous, there is no guarantee that it will deliver in certain order and time. One way you can associate a callback with a request is by using some sort of resource id in the webhook payload for correlation. But the possibility of doing that varies between different webhook providers and use cases. Perhaps @hertznsk could tell us if the correlation between a request and a callback is achievable in his use case. |
Thanks for the wonderful tool!
Is your feature request related to a problem? Please describe.
We lack the ability to forward callbacks in capture mode.
In our scenario, our application sends requests to a remote service by passing a callback url. After a while, the service sends a callback request, which should be sent to our application.
It would be convenient if we could capture this request to have sample responses for further implementation of postServeAction.
Describe the solution you'd like
Add the option
-forward <source url> <target_url>
.Record requests and responses in a data structure similar to
pairs
.Describe alternatives you've considered
Currently, we have to implement logging in the application or on an external reverse proxy, or study the documentation of an external service, which makes the preparation of the mock somewhat longer.
Additional context
No
The text was updated successfully, but these errors were encountered: