Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (16 sloc) 641 Bytes

Phore http-client

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:

You can’t perform that action at this time.