rhymix/libs/PEAR.1.9.5/HTTP/Request.php
MinSoo Kim b8fd20bbae Support HTTPS connection
Support HTTPS connection from server to server and server to cilent.
다양한 환경에서 적용하기 위해서 SSL 호스트 검증은 하지 못할듯 합니다. -- curl 이라면 가능하다고는 하는데..
2015-12-31 22:43:12 +09:00

55 lines
897 B
PHP

<?php
require_once 'HTTP/Request2.php';
class HTTP_Request extends HTTP_Request2
{
private $reponse = null;
public function addHeader($name, $value)
{
$this->setHeader($name, $value);
}
public function sendRequest($saveBody = true)
{
$response = $this->send();
$this->response = $response;
return $response;
}
public function getResponseCode() {
if($this->response)
{
return $this->response->getStatus();
}
}
public function getResponseHeader() {
if($this->response)
{
return $this->response->getHeader();
}
}
public function getResponseBody() {
if($this->response)
{
return $this->response->getBody();
}
}
public function getResponseCookies() {
if($this->response)
{
return $this->response->getCookies();
}
}
public function addPostData($name, $value, $preencoded = false)
{
$this->addPostParameter($name, $value);
}
}
?>