/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }