FIX webhook must send POST in body. Add WEBHOOK_POST_SEND_DATA_IN_BODY
for this.
This commit is contained in:
parent
5e41287ebc
commit
364bef7f79
1 changed files with 5 additions and 1 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue