PHP Package: php-fig/http-client

PSR-18 defines a standard interface for sending HTTP requests with PHP HTTP clients.

Current Version: 1.0.3
Last Updated: 2025-03-18
PHP Requirement: >=7.1
Dependencies: None

Package Description

The php-fig/http-client package defines the PSR-18 HTTP Client Interface, providing a common standard for HTTP client implementations in PHP. This allows developers to write reusable libraries that can send HTTP requests without depending on a specific client implementation. The interface ensures interoperability and makes switching between different HTTP clients seamless and consistent. PSR-18 is widely supported by libraries such as Guzzle, Symfony HttpClient, and others.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 1.0.3

Download Download v1.0.3

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/php-fig/http-client/1.0.3/loader.php';
require_once 'libs/guzzle/guzzle/7.10.0/loader.php';

use GuzzleHttp\Client;
use Psr\Http\Client\ClientInterface;

$obj = new Client();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.