Download the PHP package tal7aouy/yusr without Composer
On this page you can find all versions of the php package tal7aouy/yusr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tal7aouy/yusr
More information about tal7aouy/yusr
Files in tal7aouy/yusr
Package yusr
Short Description A lightweight HTTP client library for PHP inspired by Guzzle.
License MIT
Informations about the package yusr
🚀 YusrClient - A Powerful PHP HTTP Client
YusrClient is a robust and easy-to-use PHP HTTP client that simplifies making HTTP requests in your PHP applications. It implements the PSR-18 HTTP Client interface and provides a fluent API for sending HTTP requests.
🌟 Features
- 🔒 Implements PSR-18 HTTP Client interface
- 🛠 Singleton pattern for easy global access
- 🚦 Supports all major HTTP methods (GET, POST, PUT, DELETE, PATCH)
- 🔧 Customizable options for each request
- 🧩 Easy-to-use fluent interface
- 🔁 Automatic handling of redirects
- ⏱ Configurable timeout
- 🔐 SSL verification
📦 Installation
You can install the package via composer:
🚀 Usage
Here's a quick example of how to use YusrClient:
🛠 Configuration
You can configure the default options when getting the YusrClient instance:
📘 API Reference
Available Methods
get(string $uri, array $options = []): ResponseInterface
post(string $uri, array $options = []): ResponseInterface
put(string $uri, array $options = []): ResponseInterface
delete(string $uri, array $options = []): ResponseInterface
patch(string $uri, array $options = []): ResponseInterface
request(string $method, string $uri, array $options = []): ResponseInterface
Options
query
: array of query parameters to add to the URIheaders
: array of headers to send with the requestbody
: the body of the request (for POST, PUT, PATCH)timeout
: request timeout in secondsallow_redirects
: whether to follow redirectsverify
: whether to verify SSL certificates
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is open-sourced software licensed under the MIT license.
All versions of yusr with dependencies
ext-json Version *
ext-curl Version *
psr/http-client Version ^1.0
psr/http-message Version ^2.0