/** * Отправляет POST-запрос * @since 19.05.2010 16:27 * @author megaplan * @param string $Uri * @param array $Params GET-параметры * @return string Ответ на запрос */ public function post($Uri, array $Params = NULL) { $date = new DateTime(); $Uri = $this->processUri($Uri); $headers = array('Date' => $date->format('r'), 'Post-Fields' => $Params, 'Content-Type' => 'application/x-www-form-urlencoded'); $request = SdfApi_RequestInfo::create('POST', $this->host, $Uri, $headers); return $this->send($request); }
/** * @param $method * @param $host * @param $Uri * @param $headers * @return SdfApi_RequestInfo * @throws Exception */ protected function getInfoApiRequest($method, $host, $Uri, $headers) { if (empty($this->requestInfoApi)) { $this->requestInfoApi = SdfApi_RequestInfo::create($method, $host, $Uri, $headers); } return $this->requestInfoApi; }