PHPackages                             byjg/webrequest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. byjg/webrequest

ActiveLibrary[HTTP &amp; Networking](/categories/http)

byjg/webrequest
===============

A lightweight PSR-7 implementation and highly customized CURL wrapper for making REST calls.

6.0.0(5mo ago)5498.7k—2.3%510MITPHPPHP &gt;=8.3 &lt;8.6CI passing

Since Jul 14Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/byjg/php-webrequest)[ Packagist](https://packagist.org/packages/byjg/webrequest)[ GitHub Sponsors](https://github.com/byjg)[ RSS](/packages/byjg-webrequest/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (23)Used By (10)

   sidebar\_key webrequest   tags    php

 http

    Web Request
===========

[](#web-request)

A lightweight PSR-7 implementation and highly customized CURL wrapper for making REST calls.

[![Sponsor](https://camo.githubusercontent.com/fab14b7f7f475072ada0473f193d6f322561fd4a2958e0cc89910d053347cf27/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d2532336561346161613f6c6f676f3d67697468756273706f6e736f7273266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d306431313137)](https://github.com/sponsors/byjg)[![Build Status](https://github.com/byjg/php-webrequest/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-webrequest/actions/workflows/phpunit.yml)[![Opensource ByJG](https://camo.githubusercontent.com/425c1bbccc0f292bf4d20569ae74a6b2e384fd648f1af8911bc61de9a8dcfc0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f70656e736f757263652d62796a672d737563636573732e737667)](http://opensource.byjg.com)[![GitHub source](https://camo.githubusercontent.com/88e61eb211719144efdd570290a0456b6e13099c2df8d973f1bb43fe33bf0039/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769746875622d736f757263652d696e666f726d6174696f6e616c3f6c6f676f3d676974687562)](https://github.com/byjg/php-webrequest/)[![GitHub license](https://camo.githubusercontent.com/d529d888fb1323102f3e8531f66148d1ce166c7215f74c0a5a8f773be271daad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f62796a672f7068702d776562726571756573742e737667)](https://opensource.byjg.com/opensource/licensing.html)[![GitHub release](https://camo.githubusercontent.com/7fe103ad504628ff0c72a0df73081981f92bb696849a2cb366d22e52bee7069b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62796a672f7068702d776562726571756573742e737667)](https://github.com/byjg/php-webrequest/releases/)

Overview
--------

[](#overview)

PHP WebRequest is a **fully PSR-compliant** HTTP client package that provides:

### PSR Implementations

[](#psr-implementations)

- ✅ **[PSR-7](https://www.php-fig.org/psr/psr-7/)** - HTTP Message Interface (Request, Response, Stream)
- ✅ **[PSR-17](https://www.php-fig.org/psr/psr-17/)** - HTTP Factories (Request, Response, Stream, etc.)
- ✅ **[PSR-18](https://www.php-fig.org/psr/psr-18/)** - HTTP Client Interface

### Additional Features

[](#additional-features)

- Helper classes for common request types (JSON, Form URL Encoded, MultiPart)
- Support for parallel HTTP requests
- Mock client for testing

Documentation
-------------

[](#documentation)

- [HTTP Messages and Factories (PSR-7/PSR-17)](docs/psr7-implementation.md) - Create and manipulate HTTP requests, responses, and streams
- [Sending HTTP Requests (PSR-18)](docs/http-client.md) - Send HTTP requests with customizable options (proxy, SSL, timeouts)
- [Parallel Requests](docs/http-client-parallel.md) - Execute multiple HTTP requests concurrently for better performance
- [Testing with Mock Client](docs/mock-client.md) - Test HTTP code without real network calls
- [Request Helpers](docs/helpers.md) - Quickly build JSON, Form, and MultiPart requests
- [Comparison with Guzzle](docs/comparison-with-guzzle.md) - How WebRequest compares to Guzzle HTTP client

Basic Example
-------------

[](#basic-example)

```
