SproutCMS

This is the code documentation for the SproutCMS project

class HttpReq

Simple HTTP(s) request wrapper

Source code (10 results)

/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/Controllers/FileUploadController.php   Highlighted file source

Line 29: * Handles file uploads in chunks using the JS File API and XMLHttpRequest

/sprout/Helpers/GeoSeach.php   Highlighted file source

Line 19: use Sprout\Helpers\HttpReq;
Line 62: $result = HttpReq::req($url, $opts);

/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/Helpers/Recaptcha.php   Highlighted file source

Line 61: $res = HttpReq::req('https://www.google.com/recaptcha/api/siteverify', array('method' => 'post'), $data);

/sprout/Helpers/RssFeed.php   Highlighted file source

Line 42: $feed = HttpReq::get($url);

/sprout/Helpers/UserAgent.php   Highlighted file source

Line 42: $new_rules = HttpReq::get('https://raw.githubusercontent.com/Karmabunny/user-agents.json/master/data/user-agents.json');
Line 43: if ($new_rules and HttpReq::getLastreqStatus() == '200') {

/sprout/Helpers/WorkerLinkChecker.php   Highlighted file source

Line 209: // TODO This whole things should be using HttpReq but I'm in a rush rn.

/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);

/sprout/Widgets/VideoPlaylistWidget.php   Highlighted file source

Line 21: use Sprout\Helpers\HttpReq;
Line 124: $playlist = HttpReq::req($url, $opts);

A total of 38 lines in 10 files were found