Zttp, a developer friendly wrapper for Guzzle

If you’re not familiar with the evolution of Guzzle, the library has basically gotten more professional and less usable with each new version. New layers upon layers of specification-respecting abstractions and rules made Guzzle incredibly difficult to get started with.

Zttp solves just that, by keeping things simple:

Zttp is a simple Guzzle wrapper designed to provide a really pleasant development experience for most common use cases.

$response = Zttp::withHeaders(["Fancy" => "Pants"])->post($url, [
    "foo" => "bar",
    "baz" => "qux",
]);

var_dump($response->json());

As per usual: it depends. Zttp might float your boat, you might need Guzzle itself if you want to do some more advanced things.

Zttp (GitHub) →

(via)

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.