From 5536f6c6ce591ba05a169d2e33b6fb240378d8a4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 28 Mar 2015 21:37:53 -0400 Subject: Add Slack integration --- app/Core/HttpClient.php | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 app/Core/HttpClient.php (limited to 'app/Core') diff --git a/app/Core/HttpClient.php b/app/Core/HttpClient.php new file mode 100644 index 00000000..96860152 --- /dev/null +++ b/app/Core/HttpClient.php @@ -0,0 +1,67 @@ + array( + 'method' => 'POST', + 'protocol_version' => 1.1, + 'timeout' => self::HTTP_TIMEOUT, + 'max_redirects' => self::HTTP_MAX_REDIRECTS, + 'header' => implode("\r\n", $headers), + 'content' => json_encode($data) + ) + )); + + return @file_get_contents(trim($url), false, $context); + } +} -- cgit v1.2.3