src/Request/CurlRequest.php
protected function makeRequest()
    {
        // init Curl
        $this->client->init($this->payload['url']);
        $this->client->setOptions($this->curlOptions, $this->options);

        // get results
        $content = $this->client->execute();
        $headers = $this->client->getInfo();

        $response = new LushResponse(compact('content', 'headers'), $this);

        // handle errors
        if ($content === false || substr($headers['http_code'], 0, 1) != 2) {
            $error = [
                'code'      => $this->client->getErrorCode(),
                'message'   => $this->client->getErrorMessage(),
                'response'   => $response,
            ];

            $this->client->close();

            throw new LushRequestException($this, $error);
        }

        $this->client->close();

        return $response;
    }
protected function makeRequest()
    {
        // init Curl
        $this->client->init($this->payload['url']);
        $this->client->setOptions($this->curlOptions, $this->options);

        // get results
        $content = $this->client->execute();
        $headers = $this->client->getInfo();

        $response = new LushResponse(compact('content', 'headers'), $this);

        // handle errors
        if ($content === false || substr($headers['http_code'], 0, 1) != 2) {
            $error = [
                'code'      => $this->client->getErrorCode(),
                'message'   => $this->client->getErrorMessage(),
                'response'   => $response,
            ];

            $this->client->close();

            throw new LushRequestException($this, $error);
        }

        $this->client->close();

        return $response;
    }
protected function makeRequest ( ) { // init Curl $ this -> client -> init ( $ this -> payload [ 'url' ] ) ; $ this -> client -> setOptions ( $ this -> curlOptions , $ this -> options ) ; // get results $ content = $ this -> client -> execute ( ) ; $ headers = $ this -> client -> getInfo ( ) ; $ response = new LushResponse ( compact ( 'content' , 'headers' ) , $ this ) ; // handle errors if ( $ content === false || substr ( $ headers [ 'http_code' ] , 0 , 1 ) != 2 ) { $ error = [ 'code' => $ this -> client -> getErrorCode ( ) , 'message' => $ this -> client -> getErrorMessage ( ) , 'response' => $ response , ] ; $ this -> client -> close ( ) ; throw new LushRequestException ( $ this , $ error ) ; } $ this -> client -> close ( ) ; return $ response ; }
Sends the Curl requests and returns result array.

@return \Appstract\LushHttp\Response\LushResponse
Sends the Curl requests and returns result array .