talira

PHP HTTP client

open sourceMITfree

Guzzle is an HTTP client for PHP that makes it easy to send HTTP requests and integrate with web services. It builds query strings and POST requests, streams large uploads and downloads, handles cookies and JSON, and sends synchronous and asynchronous requests through the same interface. It uses PSR-7 for requests, responses and streams and supports PSR-18, so it works with other compatible libraries, and it abstracts the transport (cURL, PHP streams, sockets or event loops). A middleware system composes client behaviour. Its PSR-7 and promises implementations are separate packages (guzzlehttp/psr7, guzzlehttp/promises). Version 8.6 is current (PHP 7.4 to 8.6) and 7.17 is in maintenance.

Problems it solves

  • make HTTP requests to an API from PHP
  • send many HTTP requests concurrently from a PHP script
  • mock HTTP responses when testing a PHP API client
  • a PSR-18 compatible HTTP client for my PHP library

Features

  • sync and async requests through one interface
  • streaming uploads and downloads
  • cookies and JSON
  • PSR-7 and PSR-18
  • transport-agnostic handlers
  • middleware

Capabilities

Takes pluginsplan not known