The Webhook.Creator does not respect setConfigurationMethod as the underlying HTTP request builder method addPostParams has the wrong parameter name, resulting in all conversation-scoped webhooks being set to the default POST method. GET methods want love, too!
Create a Conversation Webhook with the WebhookCreator and call setConfigurationMethod with Method.GET
Check the webhook at GET https://conversations.twilio.com/v1/Conversations/CHXXXXXXX/Webhooks and see that the configuration.method is set to the default POST
Issue Summary
The
Webhook.Creator
does not respectsetConfigurationMethod
as the underlying HTTP request builder methodaddPostParams
has the wrong parameter name, resulting in all conversation-scoped webhooks being set to the defaultPOST
method. GET methods want love, too!https://github.com/twilio/twilio-java/blob/main/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java#L119 --> should be
Configuration.Method
and notConfigurationMethod
Steps to Reproduce
setConfigurationMethod
withMethod.GET
GET https://conversations.twilio.com/v1/Conversations/CHXXXXXXX/Webhooks
and see that theconfiguration.method
is set to the defaultPOST
Code Snippet
Webhook creator:
Incorrect code in generated code: https://github.com/twilio/twilio-java/blob/main/src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java#L119 --> should be
Configuration.Method
and notConfigurationMethod
Exception/Log
N/A
Technical details: