Beispiel #1
0
 /**
  * Add data to the request as XML content and set the Content-Type to application/xml.
  *
  * @return Zend_Http_Client
  */
 protected function build()
 {
     $client = parent::build();
     $convertDataToXml = $this->getDataAsXml();
     $gZen = gzencode($convertDataToXml, 5);
     if ($gZen !== false) {
         $client->setHeaders("Content-Encoding", "gzip")->setHeaders("Content-Type", "application/xml")->setRawData($gZen);
     } else {
         $client->setHeaders("Content-Type", "application/xml")->setRawData($convertDataToXml);
     }
     return $client;
 }
Beispiel #2
0
 /**
  * Add GET parameters to the request, force GET method.
  *
  * @return Zend_Http_Client
  */
 protected function build()
 {
     $client = parent::build();
     $client->setMethod("GET")->setParameterGet($this->getData());
     return $client;
 }
Beispiel #3
0
 /**
  * Add data to the request as XML content and set the Content-Type to application/xml.
  *
  * @return Zend_Http_Client
  */
 protected function build()
 {
     $client = parent::build();
     $client->setHeaders("Content-Type", "application/xml")->setRawData($this->getDataAsXml());
     return $client;
 }
Beispiel #4
0
 /**
  * Add POST parameters to the request, force POST method.
  *
  * @return Zend_Http_Client
  */
 protected function build()
 {
     $client = parent::build();
     $client->setMethod(Zend_Http_Client::POST)->setParameterPost($this->getData());
     return $client;
 }