Skip to content
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

Custom response #37

Closed
joelvh opened this issue Dec 9, 2019 · 1 comment
Closed

Custom response #37

joelvh opened this issue Dec 9, 2019 · 1 comment

Comments

@joelvh
Copy link

joelvh commented Dec 9, 2019

We've been using the Webhook Client and it's been working great! However, we just ran into a case where the response from the webhook controller needs to be XML with some static content.

Specifically, we are using Twilio and when an inbound SMS is received, we just need to respond with content type text/xml and the body <Response></Response>.

Any way to customize this?

Thanks for the great work!

@joelvh
Copy link
Author

joelvh commented Dec 10, 2019

FYI my solution was to add a webhook_response to the config array and use a custom controller to check if that exists and run it as a function, otherwise use the usual default response. It would be ideal to have an option like that built-in so that I don't have to copy the controller and routes. The reason it makes sense to have it as a function in the config is because each webhook may or may not need the custom response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant