mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX webhook must send POST in body. Add WEBHOOK_POST_SEND_DATA_IN_BODY
for this.
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user