mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Support HTTPS connection from server to server and server to cilent. 다양한 환경에서 적용하기 위해서 SSL 호스트 검증은 하지 못할듯 합니다. -- curl 이라면 가능하다고는 하는데..
55 lines
897 B
PHP
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);
|
|
}
|
|
|
|
}
|
|
|
|
?>
|