Simple HTTP(s) request wrapper

/modules/HarborAndSprout/Helpers/GoogleDriveApi.php Highlighted file source
Line 6: use Sprout\Helpers\HttpReq;
Line 69: $resp = json_decode(HttpReq::post($config['token_uri'], $params), true);
Line 108: $resp = json_decode(HttpReq::post($config['token_uri'], $params), true);
Line 181: $resp = json_decode(HttpReq::req($url, $opts, $method == 'POST' ? $data : null), true);
Line 183: $resp['headers'] = HttpReq::getLastreqHeaders();
Line 184: $resp['status'] = HttpReq::getLastreqStatus();
Line 185: $resp['info'] = HttpReq::getLastreqInfo();

/sprout/Helpers/HttpReq.php Highlighted file source
Line 25: class HttpReq
Line 38: * If you need more control, use @see HttpReq::req
Line 55: * If you need more control, use @see HttpReq::req
Line 199: if (Kohana::config('sprout.httpreq_proxy_host') and Kohana::config('sprout.httpreq_proxy_port')) {
Line 200: curl_setopt($ch, CURLOPT_PROXY, Kohana::config('sprout.httpreq_proxy_host'));
Line 201: curl_setopt($ch, CURLOPT_PROXYPORT, Kohana::config('sprout.httpreq_proxy_port'));
Line 203: if (Kohana::config('sprout.httpreq_proxy_auth')) {
Line 204: curl_setopt($ch, CURLOPT_PROXYUSERPWD, Kohana::config('sprout.httpreq_proxy_auth'));
Line 207: if (Kohana::config('sprout.httpreq_proxy_type') == 'socks5') {
Line 291: if (Kohana::config('sprout.httpreq_proxy_host') and Kohana::config('sprout.httpreq_proxy_port')) {
Line 292: curl_setopt($ch, CURLOPT_PROXY, Kohana::config('sprout.httpreq_proxy_host'));
Line 293: curl_setopt($ch, CURLOPT_PROXYPORT, Kohana::config('sprout.httpreq_proxy_port'));
Line 295: if (Kohana::config('sprout.httpreq_proxy_auth')) {
Line 296: curl_setopt($ch, CURLOPT_PROXYUSERPWD, Kohana::config('sprout.httpreq_proxy_auth'));
Line 299: if (Kohana::config('sprout.httpreq_proxy_type') == 'socks5') {

/sprout/tests/httpreqTest.php Highlighted file source
Line 14: use Sprout\Helpers\HttpReq;
Line 17: class MyHttpReq extends HttpReq
Line 26: class httpreqTest extends PHPUnit_Framework_TestCase
Line 35: HttpReq::get('https://www.google.com/');
Line 73: $this->assertEquals($expected, MyHttpReq::buildHeadersString($input));
Line 109: MyHttpReq::buildHeadersString($input);
A total of 38 lines in 10 files were found