Download the PHP package ez-php/http-client without Composer
On this page you can find all versions of the php package ez-php/http-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ez-php/http-client
More information about ez-php/http-client
Files in ez-php/http-client
Download ez-php/http-client
More information about ez-php/http-client
Files in ez-php/http-client
Vendor ez-php
Package http-client
Short Description HTTP client module for the ez-php framework — fluent cURL-based client for making outgoing HTTP requests
License MIT
Homepage https://github.com/ez-php/http-client
Package http-client
Short Description HTTP client module for the ez-php framework — fluent cURL-based client for making outgoing HTTP requests
License MIT
Homepage https://github.com/ez-php/http-client
Please rate this library. Is it a good library?
Informations about the package http-client
ez-php/http-client
HTTP client module for the ez-php framework — fluent cURL-based client for outgoing HTTP requests, a static Http façade, and a FakeTransport for testing.
Requirements
- PHP 8.5+
- ext-curl
- ez-php/framework 0.*
Installation
Setup
Register the service provider:
Usage
Fluent request builder
Injected client (without façade)
Testing
Replace the transport with a fake in tests:
Error handling
HttpClientException is thrown only on transport failures (cURL error, DNS failure, empty URL). HTTP 4xx/5xx responses are returned as normal HttpResponse objects — check ok() or status().
Classes
| Class | Description |
|---|---|
TransportInterface |
I/O seam: send(method, url, headers, body): HttpResponse |
CurlTransport |
cURL implementation — all curl_* calls are isolated here |
FakeTransport |
Test double that returns pre-configured HttpResponse objects |
HttpClient |
Entry point; factory methods (get, post, put, patch, delete) returning HttpRequest |
HttpRequest |
Fluent builder; clone-based withers; dispatch shortcuts (send, json, body, status) |
HttpResponse |
Immutable value object: status(), body(), json(), header(), ok() |
HttpClientException |
Thrown on transport-level failures (not on 4xx/5xx) |
Http |
Static façade backed by a managed HttpClient singleton |
HttpClientServiceProvider |
Binds transport + client; wires static façade; eager boot |
License
MIT — Andreas Uretschnig
All versions of http-client with dependencies
PHP Build Version
Package Version
The package ez-php/http-client contains the following files
Loading the files please wait ...