diff --git a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php index 65b5dffb0b2..0d4b5ab54cd 100644 --- a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php @@ -101,7 +101,11 @@ class InterfaceWebhookTriggers extends DolibarrTriggers //'Accept: application/json' ); - $response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, $headers, array('http', 'https'), 2, -1); + $method = 'POST'; + if (getDolGlobalString('WEBHOOK_POST_SEND_DATA_IN_BODY')) { + $method = 'POSTALREADYFORMATED'; + } + $response = getURLContent($tmpobject->url, $method, $jsonstr, 1, $headers, array('http', 'https'), 2, -1); if (empty($response['curl_error_no']) && $response['http_code'] >= 200 && $response['http_code'] < 300) { $nbPosts++;