Last Updated: November 27, 2018
· nategood

Make cURL in PHP less sucky

Httpful is a simple, chainable, readable PHP library intended to make speaking HTTP sane. It let's the developer focus on interacting with APIs instead of sifting through curl set_opt pages and is an ideal PHP REST client.


$url = "" . urlencode('#PHP');

$response = Request::get($url)
    ->withXTrivialHeader('Just as a demo')

foreach ($response->body->results as $tweet) {
    echo "@{$tweet->from_user} tweets \"{$tweet->text}\"\n";

2 Responses
Add your response


See also: Buzz Browser

use Buzz\Browser;

$url = "";

$response = (new Browser())->post(
    array("x-trivial" => "Just as a demo"),
    "some body content to be POSTed here"
if (!$response->isSuccessful()) {
    echo "Error " . $response->getStatusCode() . ": " ;
    echo $response->getReasonPhrase();
} else {
    echo $response;

for a lower level approach to the above.

over 1 year ago ·

This is the way to download chrome browser at online and it could be easy to get the google chrome browser here.

6 months ago ·