Skip to content

Commit 0f4352f

Browse files
committed
Added json header
1 parent 4042178 commit 0f4352f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Request.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function initialize(Telegram $telegram)
4646

4747
public static function setInputRaw($input)
4848
{
49-
if (is_string($input)) {
49+
if (is_string($input) | $input == false) {
5050
self::$input = $input;
5151
} else {
5252
throw new TelegramException("Log input is not a string");
@@ -116,6 +116,7 @@ public static function executeCurl($action, array $data)
116116
}
117117

118118
$curlConfig = array(
119+
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
119120
CURLOPT_URL => 'https://api.telegram.org/bot' . self::$telegram->getApiKey() . '/' . $action,
120121
CURLOPT_POST => true,
121122
CURLOPT_RETURNTRANSFER => true

0 commit comments

Comments
 (0)