private function getRequest() {

        $token = $this->getParam('token');

        if (empty($token)) {
            throw new ConfigurationException(__CLASS__ . ' is not configured properly. Please set "token" parameter properly.');
        }

        $request = new Request();
        $request->setUri($this->url);
        $request->setMethod(Request::METHOD_POST);

        $request->getHeaders()->addHeaders(array(
          'accept' => 'application/json',
          'content-type' => 'application/json',
          'authorization' => 'Basic ' . $token
        ));

        return $request;
    }
private function getRequest() {

        $token = $this->getParam('token');

        if (empty($token)) {
            throw new ConfigurationException(__CLASS__ . ' is not configured properly. Please set "token" parameter properly.');
        }

        $request = new Request();
        $request->setUri($this->url);
        $request->setMethod(Request::METHOD_POST);

        $request->getHeaders()->addHeaders(array(
          'accept' => 'application/json',
          'content-type' => 'application/json',
          'authorization' => 'Basic ' . $token
        ));

        return $request;
    }
private function getRequest ( ) { $ token = $ this -> getParam ( 'token' ) ; if ( empty ( $ token ) ) { throw new ConfigurationException ( __CLASS__ . ' is not configured properly. Please set "token" parameter properly.' ) ; } $ request = new Request ( ) ; $ request -> setUri ( $ this -> url ) ; $ request -> setMethod ( Request :: METHOD_POST ) ; $ request -> getHeaders ( ) -> addHeaders ( array ( 'accept' => 'application/json' , 'content-type' => 'application/json' , 'authorization' => 'Basic ' . $ token ) ) ; return $ request ; }
Prepare request configuration

@return Request
@throws ConfigurationException
Prepare request configuration