summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/curl.php6
-rw-r--r--classes/events.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/classes/curl.php b/classes/curl.php
index b96367d..355b13c 100644
--- a/classes/curl.php
+++ b/classes/curl.php
@@ -33,14 +33,14 @@ class curl {
}
}
- public static function request($url, $data) {
- $ch = curl_init($url);
+ public static function request($callback, $data) {
+ $ch = curl_init($callback->url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
- "Content-Type: application/json",
+ "Content-Type: application/" . $callback->type,
"Content-Length: " . strlen($data))
);
diff --git a/classes/events.php b/classes/events.php
index 613ac9d..6740490 100644
--- a/classes/events.php
+++ b/classes/events.php
@@ -98,7 +98,7 @@ class events {
private static function send($data, $callback) {
$curl = new curl();
$package = self::packup($data);
- $curl::request($callback->url, $package);
+ $curl::request($callback, $package);
}
/**