phore/http-client

Http client library for fast api access

v1.0.2 2020-04-27 20:08 UTC

This package is auto-updated.

Last update: 2020-10-14 11:03:30 UTC


README

Actions Status

Easy to use http-client with fluent api.

Example

phore_http_request("http://localhost/test.php?case=200")->withMethod()

Request caching

Request Caching requires phore/cache package to be installed

$cache = new Cache(new ObjectStore(new FileSystemObjectStoreDriver("/tmp/cache1")));

$req = phore_http_request("http://localhost/")->withCache($cache)->send();
if ($req->isFromCache() === true)
    echo "From Cache: " . $req->getBody();

Examples: