mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 20:27:31 +02:00
Explicitly set content-type header, and post JSON as body
This commit is contained in:
committed by
Jordi Boggiano
parent
188a46836b
commit
52d9096b14
@@ -87,7 +87,8 @@ class SlackWebhookHandler extends AbstractProcessingHandler
|
|||||||
if (defined('CURLOPT_SAFE_UPLOAD')) {
|
if (defined('CURLOPT_SAFE_UPLOAD')) {
|
||||||
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
|
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
|
||||||
}
|
}
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, array('payload' => $postString));
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-type: application/json']);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
|
||||||
|
|
||||||
Curl\Util::execute($ch);
|
Curl\Util::execute($ch);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user