Jaxel
Well-known member
How do you do http requests in XF2?
This was my code in XF1:
This was my code in XF1:
Code:
$client = new Zend_Http_Client('https://api.twitch.tv/kraken/streams');
$client->setHeaders('Accept', 'application/vnd.twitchtv.v5+json');
$client->setHeaders('Client-ID', $service['service_apikey']);
$client->setParameterGet(array(
'channel' => $channelsList,
'limit' => 100,
));
try
{
$feed = $client->request()->getBody();
$json = json_decode($feed, true);
}
Last edited: