Libraries & Packages

Guzzle: HTTP Client for PHP

Guzzle is an HTTP client library for sending requests to APIs and other HTTP services from PHP applications.

Overview

Guzzle is an HTTP client for PHP. It provides an API for making HTTP requests, configuring headers and request options, handling responses and working with asynchronous operations.

Common use cases

PHP applications use HTTP clients to connect to payment providers, remote APIs, webhooks and internal services. A dedicated client library can make timeouts, authentication and response handling more consistent.

Installation

Guzzle is distributed through Composer. Check the package's current PHP and extension requirements before adding it to an application.

Implementation guidance

Set reasonable connection and overall timeouts. Handle network errors and non-success status codes deliberately. Validate remote response data before using it, and never disable TLS certificate verification as a routine workaround. Avoid sending secrets to untrusted hosts.

Official resource

Guzzle documentation: https://docs.guzzlephp.org/

Share this page Help other developers discover this resource.