webhook
webhook copied to clipboard
Implement `method` function in `WebhookMessage` class
This pull request introduces a new method function in the WebhookMessage class. This function allows setting the HTTP method for the webhook request. The HTTP method can be any valid method such as 'GET', 'POST', 'PUT', 'DELETE', etc.
The method function enhances the flexibility of the WebhookMessage class by allowing the user to specify the HTTP method used when sending the webhook request. This is particularly useful when interacting with APIs that require specific HTTP methods for certain endpoints.
Here is a brief overview of the changes:
- Added a new
methodfunction in theWebhookMessageclass. - The
methodfunction accepts a string parameter representing the HTTP method. - The HTTP method is stored in the
methodproperty of theWebhookMessageclass.
This change has been fully tested to ensure it works as expected and maintains the existing functionality of the WebhookMessage class. The corresponding unit tests have also been added to verify the correct behavior of the new function.