php - Native cURL with CI -


how can use native curl in server instead curl library in codeigniter? have curl code made in native curl in php, want implement ci ci doesn't recognize action want.

you can use guzzel or response

both of have pretty extensive documentation & support

example guzzel

$client = new guzzlehttp\client(); $res = $client->get('https://api.github.com/user', ['auth' =>  ['user', 'pass']]); echo $res->getstatuscode(); // "200" echo $res->getheader('content-type'); // 'application/json; charset=utf8' echo $res->getbody(); // {"type":"user"...' 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -