PHPackages                             pugkong/symfony-requests - 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. pugkong/symfony-requests

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

pugkong/symfony-requests
========================

A lightweight PHP library for making HTTP requests and handling responses using Symfony components

v0.1.0(1y ago)020UnlicensePHPPHP &gt;=8.2

Since Jan 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/PugKong/symfony-requests)[ Packagist](https://packagist.org/packages/pugkong/symfony-requests)[ Docs](https://github.com/PugKong/symfony-requests)[ RSS](/packages/pugkong-symfony-requests/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Symfony Requests
================

[](#symfony-requests)

[![License](https://camo.githubusercontent.com/7d07e2cc4f23dfcbadbde101134e025d9bdd511d87317bf6f5fbe3f98a642eb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7075676b6f6e672f73796d666f6e792d7265717565737473)](LICENSE)[![Workflow: CI](https://github.com/PugKong/symfony-requests/actions/workflows/ci.yml/badge.svg)](https://github.com/PugKong/symfony-requests/actions/workflows/ci.yml)[![Coverage Status](https://camo.githubusercontent.com/1e8b74033b6f7790d8ce790c73c7512c32d33e17a8c2b568b68b3f7d7818eeea/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f5075674b6f6e672f73796d666f6e792d72657175657374732f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/PugKong/symfony-requests?branch=main)[![Packagist Version](https://camo.githubusercontent.com/6528887655a0752707a1c6a2cf770f23902ea49e7030f60eac73bb962dbc56f1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7075676b6f6e672f73796d666f6e792d7265717565737473)](https://packagist.org/packages/pugkong/symfony-requests)

**Symfony Requests** is a lightweight and flexible library that simplifies making HTTP requests and handling responses in Symfony-based PHP applications. It leverages Symfony's `HttpClient` and `Serializer` components while providing additional functionality, such as URI templating and streamlined request-response workflows.

🚀 Installation
--------------

[](#-installation)

Install the library via [Composer](https://getcomposer.org/)

```
composer require pugkong/symfony-requests
```

🌟 Features
----------

[](#-features)

- Build and send HTTP requests effortlessly
- Supports URI templates for dynamic endpoint resolution
- Leverages Symfony Serializer for easy data normalization and encoding
- Provides intuitive methods for accessing and deserializing response data

🔧 Requirements
--------------

[](#-requirements)

- PHP 8.2 or higher
- Symfony HttpClient and Serializer components
- Optionally, a URI template implementation (e.g., `guzzlehttp/uri-template`) for URI template support

📄 Usage Example
---------------

[](#-usage-example)

Below is a complete example showcasing how to use the library for building and sending requests, deserializing responses, and handling errors

```
