for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace XoopsModules\Wggithub\Github\Http;
use XoopsModules\Wggithub\Github;
/**
* HTTP request envelope.
*
* @author Miloslav Hůla (https://github.com/milo)
*/
class Request extends Message
{
/** HTTP request method */
const
DELETE = 'DELETE',
GET = 'GET',
HEAD = 'HEAD',
PATCH = 'PATCH',
POST = 'POST',
PUT = 'PUT';
/** @var string */
private $method;
private $url;
* @param string
* @param array
* @param string|NULL
public function __construct($method, $url, array $headers = [], $content = NULL)
$this->method = $method;
$this->url = $url;
parent::__construct($headers, $content);
}
* @return bool
public function isMethod($method)
return strcasecmp($this->method, $method) === 0;
* @return string
public function getMethod()
return $this->method;
public function getUrl()
return $this->url;
* @return self
public function addHeader($name, $value)
return parent::addHeader($name, $value);
public function setHeader($name, $value)
return parent::setHeader($name, $value);