Commit 98811ef7 authored by okhin's avatar okhin 🚴

We want to follow the 302 and the likes, also enforcing json content-type.

parent dac45805
......@@ -9,8 +9,9 @@ class Api {
$curl = curl_init();
$url = API_BASE . $url . "/?format=json";
curl_setopt($curl, CURLOPT_URL, $url);
//curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($curl);
curl_close($curl);
return $result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment