@param string $url
@param array  $parameters

@return \stdClass
@throws Exception
@throws HttpException
547942
public function post($url, $parameters = [])
    {
        $url = static::LOCATION.$url;
        $headers = $this->buildHeaders();

        $request = $this->requestProvider->createRequest('POST', $url, $headers, json_encode($parameters));
        $response = $this->client->send($request);

        $this->errorCheckResponse($response);

        return json_decode($this->streamToString($response->getBody()));
    }
115562
public function execute($action, array $parameters = []) {
        $result = null;
        if (is_string($action)) {
            $actionParts = explode("@", $action);
            $controllerClass = $actionParts[0];
            $controllerMethodName = sizeof($actionParts) > 1 ? $actionParts[1] : "index";
            $controller = Controllers::get($controllerClass);
            if ($controller == null) {
                throw new ActionNotFoundException ( "Controller \"$controllerClass\" not found !!");
            }
            if (method_exists($controller, $controllerMethodName)) {
                $controllerMethodParams = $this->getParameterValues(new ReflectionMethod($controller, $controllerMethodName), $parameters);
                $result = call_user_func_array([$controller, $controllerMethodName], $controllerMethodParams);
            }
            else {
                throw new ActionNotFoundException ("Method \"$controllerMethodName\" not found in controller \"$controllerClass\" !!");
            }
        }
        else if (is_callable($action)) {
            $actionParams = $this->getParameterValues(new ReflectionFunction($action), $parameters);
            $result = call_user_func_array($action, $actionParams);
        }
        return $result;
    }
415221
protected function doCall(array $parameters = array())
    {
        // check if curl is available
        if (!function_exists('curl_init')) {
            throw Exception::CurlNotInstalled();
        }

        // init curl
        $curl = curl_init();

        // set options
        curl_setopt($curl, CURLOPT_URL, $this->createUrl($parameters));
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_TIMEOUT, 10);
        if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) {
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
        }

        // execute
        $response = curl_exec($curl);

        // fetch errors
        $errorNumber = curl_errno($curl);
        $errorMessage = curl_error($curl);

        // close curl
        curl_close($curl);

        // we have errors
        if ($errorNumber != '') {
            throw new Exception($errorMessage);
        }

        // redefine response as json decoded
        $response = json_decode($response);

        // API returns with an error
        if (isset($response->error_message)) {
            throw new Exception($response->error_message);
        }

        // return the content
        return $response->results;
    }
592867
public static function createFromUrl($url)
    {
        $url = (string) $url;
        $url = trim($url);
        $original_url = $url;
        $url = self::sanitizeUrl($url);

        //if no valid scheme is found we add one
        if (is_null($url)) {
            throw new RuntimeException(sprintf('The given URL: `%s` could not be parse', $original_url));
        }

        $components = array_merge(array(
            'scheme' => null,
            'user' => null,
            'pass' => null,
            'host' => null,
            'port' => null,
            'path' => null,
            'query' => null,
            'fragment' => null,
        ), self::parseUrl($url));
        $components = self::formatAuthComponent($components);
        $components = self::formatPathComponent($components, $original_url);

        return new static(
            new Components\Scheme($components['scheme']),
            new Components\User($components['user']),
            new Components\Pass($components['pass']),
            new Components\Host($components['host']),
            new Components\Port($components['port']),
            new Components\Path($components['path']),
            new Components\Query($components['query']),
            new Components\Fragment($components['fragment'])
        );
    }
452970
private function calculateHeader(array $parameters, $url)
        {
            // divide into parts
            $parts = parse_url((string) $url);

            // init var
            $chunks = array();

            // process queries
            foreach ($parameters as $key => $value) {
                $chunks[] = str_replace(
                    '%25', '%',
                    self::urlencode_rfc3986($key) . '="' . self::urlencode_rfc3986($value) . '"'
                );
            }

            // build return
            $return = 'Authorization: OAuth realm="", ';
            $return .= implode(',', $chunks);

            // prepend name and OAuth part
            return $return;
        }
1368908
protected function getRequest($url, $parameters = [], $modified = null)
    {
        if (!empty($parameters)) {
            $this->parameters->addGet($parameters);
        }

        return $this->request($url, $modified);
    }
650633
public function head($url, $headers = [], $parameters = null)
    {
        return $this->send(Method::HEAD, $url, $parameters, $headers);
    }
1159325
public function url( string$url ):self
	{
		$url= parse_url($url);

		if( !is_array($url) )
			throw new \Exception("Url '$url' is invalid.");

		foreach( $url as $key=>$value )
		{
			$this->$key= $value;
		}

		return $this;
	}
1073144
private function buildUrl($url, $parameters)
    {
        $prams_former = '?';

        foreach ($parameters as $key => $value) {
            $prams_former = $prams_former.$key.'='.$value.'&';
        }

        return $url.substr($prams_former, 0, -1);
    }
993533
public function post($url, array $parameters = array(), $content = null)
    {
        return $this->call(Request::METHOD_POST, $url, $parameters, $content);
    }
521959
protected function parseUrl($url, $parameters)
    {
        // If provided $url is a route name...
        if ($this->route->has($url)) {
            $url = $this->url->route($url, $parameters);
        } else {
            $url = $this->url->to($url, $parameters);
        }

        return $url;
    }
711407
public function execGET($url, array $params = [])
    {
        $url = $this->baseUrl . $url;

        // Build the query from the parameters
        if ($params !== []) {
            $url .= '?' . http_build_query($params);
        }

        // Set request options
        $this->addOptions([
            CURLOPT_URL => $url,
            CURLOPT_HTTPGET => true,
        ]);

        return $this->exec();
    }
26256
public function request($url, array $parameters = [], $requestMethod = 'GET')
    {
        try {
            $method = strtolower($requestMethod) === 'get' ? 'query' : 'form_params';
            $response = $this->getClient()->request($requestMethod, $url, [
                $method  => array_merge($this->getParams(), $parameters),
                'Accept' => 'application/json'
            ]);
            return json_decode($response->getBody());
        } catch (RequestException $e) {
            $this->printErrorMessage(Psr7\str($e->getResponse()), false);
        }
        return [];
    }
762729
function post($url, $parameters = array(), $multi = false) {
    $response = $this->oAuthRequest($url, 'POST', $parameters, $multi );
    if ($this->format === 'json' && $this->decode_json) {
      return json_decode($response, true);
    }
    return $response;
  }
1146157
public function request($url, array $params = array())
    {
        $uri = $this->makeUri($url, $params);

        return new Psr7\Request('get', $uri);
    }
1135497
public static function call($url)
    {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 25);
        curl_setopt($ch, CURLOPT_TIMEOUT, 45);

        $result = curl_exec($ch);

        if (! $result) {
            throw new \Exception(sprintf('The endpoint "%s" is not returning anything.', $url));
        }

        return simplexml_load_string($result);
    }
606351
public function request($url)
    {
        try {
            $resp = $this->guzzle->get($url);
            return (string) $resp->getBody();
        } catch (RequestException $e) {
            $response = $e->getResponse();
            throw new HttpException($response ? $response->getBody() : null, $e->getMessage(), $e->getCode(), $e);
        } catch (TransferException $e) {
            throw new HttpException('', $e->getMessage(), $e->getCode(), $e);
        }
    }