mirror of
https://github.com/friendica/friendica
synced 2024-11-13 09:23:44 +01:00
add jsonp support to api
This commit is contained in:
parent
295b4d7f61
commit
a490140218
|
@ -166,7 +166,10 @@
|
|||
case "json":
|
||||
header ("Content-Type: application/json");
|
||||
foreach($r as $rr)
|
||||
return json_encode($rr);
|
||||
$json = json_encode($rr);
|
||||
if ($_GET['callback'])
|
||||
$json = $_GET['callback']."(".$json.")";
|
||||
return $json;
|
||||
break;
|
||||
case "rss":
|
||||
header ("Content-Type: application/rss+xml");
|
||||
|
|
Loading…
Reference in a new issue