src/Common/Factory/HttpRequest.php
public function execute()
    {
        $aClientConfig   = [
            'base_uri'        => $this->sBaseUri,
            'verify'          => !(Environment::is(Environment::ENV_DEV) || Environment::is(Environment::ENV_TEST)),
            'allow_redirects' => Environment::not(Environment::ENV_TEST),
            'http_errors'     => Environment::not(Environment::ENV_TEST),
        ];
        $aRequestOptions = [
            'headers' => $this->aHeaders,
        ];

        $this->compile($aClientConfig, $aRequestOptions);

        $oClient = Factory::factory('HttpClient', '', $aClientConfig);

        return Factory::factory(
            'HttpResponse',
            '',
            $oClient->request(static::HTTP_METHOD, $this->sPath, $aRequestOptions)
        );
    }
public function execute()
    {
        $aClientConfig   = [
            'base_uri'        => $this->sBaseUri,
            'verify'          => !(Environment::is(Environment::ENV_DEV) || Environment::is(Environment::ENV_TEST)),
            'allow_redirects' => Environment::not(Environment::ENV_TEST),
            'http_errors'     => Environment::not(Environment::ENV_TEST),
        ];
        $aRequestOptions = [
            'headers' => $this->aHeaders,
        ];

        $this->compile($aClientConfig, $aRequestOptions);

        $oClient = Factory::factory('HttpClient', '', $aClientConfig);

        return Factory::factory(
            'HttpResponse',
            '',
            $oClient->request(static::HTTP_METHOD, $this->sPath, $aRequestOptions)
        );
    }
public function execute ( ) { $ aClientConfig = [ 'base_uri' => $ this -> sBaseUri , 'verify' => ! ( Environment :: is ( Environment :: ENV_DEV ) || Environment :: is ( Environment :: ENV_TEST ) ) , 'allow_redirects' => Environment :: not ( Environment :: ENV_TEST ) , 'http_errors' => Environment :: not ( Environment :: ENV_TEST ) , ] ; $ aRequestOptions = [ 'headers' => $ this -> aHeaders , ] ; $ this -> compile ( $ aClientConfig , $ aRequestOptions ) ; $ oClient = Factory :: factory ( 'HttpClient' , '' , $ aClientConfig ) ; return Factory :: factory ( 'HttpResponse' , '' , $ oClient -> request ( static :: HTTP_METHOD , $ this -> sPath , $ aRequestOptions ) ) ; }
Configures and executes the HTTP request

@return HttpResponse
@throws \Nails\Common\Exception\FactoryException
Configures and executes the HTTP request