talira

Buzz (PHP HTTP client)

PHP's lightweight HTTP client

open sourceMITfree

Buzz is a lightweight PHP library (under 1,000 lines of code) for sending HTTP requests, by Kris Wallsmith and Tobias Nyholm. It has three clients, FileGetContents, Curl and MultiCurl (batch requests and HTTP/2 server push), and a Browser class on top that remembers the last request. It implements the PSR-18 HTTP client interface and works with PSR-7 messages created through any PSR-17 factory, so it can stand in wherever a PSR-18 client is expected.

Problems it solves

  • a small PSR-18 HTTP client for my PHP library
  • send several HTTP requests in parallel from PHP with curl
  • make HTTP requests in PHP without pulling in Guzzle

Features

  • FileGetContents, Curl and MultiCurl clients
  • batch requests and HTTP/2 server push with MultiCurl
  • PSR-18 client with PSR-7 messages
  • Browser class that keeps the last request
  • under 1,000 lines of code

Alternatives

The same job

These do what Buzz (PHP HTTP client) does.

  1. Guzzle PHP HTTP client
  2. PHP Curl Class Object-oriented wrapper around PHP's cURL extension for HTTP requests
  3. HTTPlug HTTP client abstraction and plugins for PHP

Compare Buzz (PHP HTTP client) with the top 3