spatie / laravel-webhook-client

Receive webhooks in Laravel apps
https://freek.dev/1383-sending-and-receiving-webhooks-in-laravel-apps
MIT License
1k stars 147 forks source link

Enhance Webhook Client to Support Multiple HTTP Methods for Receiving Requests #192

Closed emrancu closed 1 year ago

emrancu commented 1 year ago

Currently, the package only supports the 'POST' method for receiving webhook requests. However, it would be beneficial to extend this functionality to handle requests with any method, such as 'GET', 'PUT', and more.

One specific use case we encountered was when working with ElasticMail. They send webhook requests using the 'GET' method, which is not currently supported by the package. To ensure compatibility with ElasticMail and other services that utilize different HTTP methods, we need to enhance the webhook client to handle these requests appropriately.

freekmurze commented 1 year ago

The tests are failing could you take a look?

emrancu commented 1 year ago

Ok I will check soon.

emrancu commented 1 year ago

Hello @freekmurze , I have fixed the issue. Please check now.

image
freekmurze commented 1 year ago

That looks good 👍

Could you also update the readme with a nice example on how to use this new feature?

emrancu commented 1 year ago

I have updated the readme.

freekmurze commented 1 year ago

Thanks!

emrancu commented 1 year ago

Thank you so much ❤️

Currently we are working with override.