public function request($method, $uri, array $params = [], array $options = [])
    {
        $this
            ->setMethod($method)
            ->setUri($uri);

        if (!empty($params)) {
            $this->setParams($params, true);
        }
        if (!empty($options['headers'])) {
            $this->setHeaders($options['headers'], true);
        }
        if (isset($options['full'])) {
            $this->setFullResponse($options['full']);
        }
        if (isset($options['json'])) {
            $this->setJsonRequest($options['json']);
        }

        return $this;
    }
public function request($method, $uri, array $params = [], array $options = [])
    {
        $this
            ->setMethod($method)
            ->setUri($uri);

        if (!empty($params)) {
            $this->setParams($params, true);
        }
        if (!empty($options['headers'])) {
            $this->setHeaders($options['headers'], true);
        }
        if (isset($options['full'])) {
            $this->setFullResponse($options['full']);
        }
        if (isset($options['json'])) {
            $this->setJsonRequest($options['json']);
        }

        return $this;
    }
public function request ( $ method , $ uri , array $ params = [ ] , array $ options = [ ] ) { $ this -> setMethod ( $ method ) -> setUri ( $ uri ) ; if ( ! empty ( $ params ) ) { $ this -> setParams ( $ params , true ) ; } if ( ! empty ( $ options [ 'headers' ] ) ) { $ this -> setHeaders ( $ options [ 'headers' ] , true ) ; } if ( isset ( $ options [ 'full' ] ) ) { $ this -> setFullResponse ( $ options [ 'full' ] ) ; } if ( isset ( $ options [ 'json' ] ) ) { $ this -> setJsonRequest ( $ options [ 'json' ] ) ; } return $ this ; }
Build a HTTP request

@param string $method
@param string $uri
@param array $params
@param array $options

@return $this
Build a HTTP request