/** * creates a http connection to specified uri * @param string $uri * @param \stubbles\peer\HeaderList $headers * @return \stubbles\peer\http\HttpConnection * @since 3.1.0 * @api */ function http(string $uri, HeaderList $headers = null) : HttpConnection { return HttpUri::fromString($uri)->connect($headers); }
/** * @test */ public function parseRecognizesHttpsUris() { assert(Parse::toType('https://example.net/'), equals(HttpUri::fromString('https://example.net/'))); }
public function validValuesWithoutDnsEntry() : array { return [['http://stubbles.doesNotExist/'], [HttpUri::fromString('http://stubbles.doesNotExist/')]]; }