You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request proposes adding support for custom webhooks and replacing the current dependency on the Echo framework with native HTTP functionality.
In internal/manager/webhook_manager.go
Benefits:
Flexibility: Supporting custom webhooks will allow users to integrate the system with a wider variety of services.
Reduced Dependencies: Replacing Echo with native HTTP can simplify the project and reduce potential security and maintenance concerns associated with external libraries.
The text was updated successfully, but these errors were encountered:
Regarding the custom webhook feature, the current implementation supports the following workaround:
The GetWebhookGetRequestHandler method returns a GET request handler for the webhook, while GetWebhookPostRequestHandler provides a POST request handler.
postHandler:=wapiClient.GetWebhookPostRequestHandler()
err:=postHandler(context) // This can be invoked inside any custom webhook handler, whether using Echo, native HTTP, or other server types.
To use this functionality, simply omit the webhookPath parameter when creating the client. When the webhookPath is not provided, the SDK is designed to skip creating a webhook server. Instead, it functions as a component utility, allowing you to utilize the webhook handlers (GetWebhookPostRequestHandler or GetWebhookGetRequestHandler) as needed.
I’d also like to better understand your perspective on switching to native http. Specifically:
Why do you think we should switch to native http?
Do we need to extend support for multiple server dependencies (e.g., Echo, native HTTP, Gin, etc.)? Possibly if the above setup works in your case?
I did try to use the same proposal you told me "postHandler := apiClient.GetWebhookPost RequestHandler() err := post Handler(context)" before to post this request but dont works when i want to assign a custom context, in my case.
This request proposes adding support for custom webhooks and replacing the current dependency on the Echo framework with native HTTP functionality.
In internal/manager/webhook_manager.go
Benefits:
The text was updated successfully, but these errors were encountered: