1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 00:26:10 +02:00

Switch HipChatHandler to API v2

This commit is contained in:
korchasa
2015-02-03 20:39:09 +03:00
parent 7583a2b96b
commit 01549ec4d0
2 changed files with 4 additions and 5 deletions

View File

@@ -118,7 +118,6 @@ class HipChatHandler extends SocketHandler
{
$dataArray = array(
'from' => $this->name,
'room_id' => $this->room,
'notify' => $this->notify,
'message' => $record['formatted'],
'message_format' => $this->format,
@@ -136,7 +135,7 @@ class HipChatHandler extends SocketHandler
*/
private function buildHeader($content)
{
$header = "POST /v1/rooms/message?format=json&auth_token=".$this->token." HTTP/1.1\r\n";
$header = "POST /v2/room/".$this->room."/notification?auth_token=".$this->token." HTTP/1.1\r\n";
$header .= "Host: {$this->host}\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($content) . "\r\n";