protected function configureRequest(RequestInterface $Request)
    {
        if ($Request->getStatus() >= Curl::STATUS_SENT){
            $Request->reset();
        }
        if (isset($this->properties[self::PROPERTY_HTTP_METHOD]) &&
            $this->properties[self::PROPERTY_HTTP_METHOD] !== ''){
            $Request->setMethod($this->properties[self::PROPERTY_HTTP_METHOD]);
        }
        $url = $this->configureURL($this->getOptions());
        if ($this->verifyUrl($url)) {
            $url = rtrim($this->getBaseUrl(),"/")."/".$url;
            $Request->setURL($url);
        }
        $data = ($this->getData()?$this->getData():NULL);
        $data = $this->configureData($data);
        $Request->setBody($data);
        if ($this->authRequired()){
            if (isset($this->Auth)){
                $this->Auth->configureRequest($Request);
            }
        }
        return $Request;
    }
protected function configureRequest(RequestInterface $Request)
    {
        if ($Request->getStatus() >= Curl::STATUS_SENT){
            $Request->reset();
        }
        if (isset($this->properties[self::PROPERTY_HTTP_METHOD]) &&
            $this->properties[self::PROPERTY_HTTP_METHOD] !== ''){
            $Request->setMethod($this->properties[self::PROPERTY_HTTP_METHOD]);
        }
        $url = $this->configureURL($this->getOptions());
        if ($this->verifyUrl($url)) {
            $url = rtrim($this->getBaseUrl(),"/")."/".$url;
            $Request->setURL($url);
        }
        $data = ($this->getData()?$this->getData():NULL);
        $data = $this->configureData($data);
        $Request->setBody($data);
        if ($this->authRequired()){
            if (isset($this->Auth)){
                $this->Auth->configureRequest($Request);
            }
        }
        return $Request;
    }
protected function configureRequest ( RequestInterface $ Request ) { if ( $ Request -> getStatus ( ) >= Curl :: STATUS_SENT ) { $ Request -> reset ( ) ; } if ( isset ( $ this -> properties [ self :: PROPERTY_HTTP_METHOD ] ) && $ this -> properties [ self :: PROPERTY_HTTP_METHOD ] !== '' ) { $ Request -> setMethod ( $ this -> properties [ self :: PROPERTY_HTTP_METHOD ] ) ; } $ url = $ this -> configureURL ( $ this -> getOptions ( ) ) ; if ( $ this -> verifyUrl ( $ url ) ) { $ url = rtrim ( $ this -> getBaseUrl ( ) , "/" ) . "/" . $ url ; $ Request -> setURL ( $ url ) ; } $ data = ( $ this -> getData ( ) ? $ this -> getData ( ) : NULL ) ; $ data = $ this -> configureData ( $ data ) ; $ Request -> setBody ( $ data ) ; if ( $ this -> authRequired ( ) ) { if ( isset ( $ this -> Auth ) ) { $ this -> Auth -> configureRequest ( $ Request ) ; } } return $ Request ; }
Verifies URL and Data are setup, then sets them on the Request Object
@param RequestInterface $Request
@return RequestInterface
Verifies URL and Data are setup then sets them on the Request Object