for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Generics\Client;
use Generics\Socket\Url;
use Generics\Socket\SecureClientSocket;
use Generics\Streams\HttpStream;
class HttpsClient extends SecureClientSocket implements HttpStream
{
use HttpClientTrait;
/**
* Create a new https client
*
* @param Url $url
* The url for http request
* @param string $proto
* The protocol to use (default = HTTP/1.1)
* @param integer $timeout
* Optional timeout for request (default = 10 seconds)
*/
public function __construct(Url $url, $proto = 'HTTP/1.1', $timeout = 10)
parent::__construct($url);
$this->setTimeout($timeout);
$this->setPath($url->getPath());
$this->setProtocol($proto);
$this->setQueryString($url->getQueryString());
$this->reset();
$this->resetHeaders();
}
* {@inheritdoc}
* @see \Generics\Streams\HttpStream::request()
public function request(string $requestType)
$this->requestImpl($requestType);