Download the PHP package jardisadapter/http without Composer
On this page you can find all versions of the php package jardisadapter/http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jardisadapter/http
More information about jardisadapter/http
Files in jardisadapter/http
Package http
Short Description PSR-18 HTTP client with cURL transport, Bearer and Basic auth, retry with exponential backoff, and minimal footprint; a building block of the open-source foundation that Jardis-generated DDD code runs on
License MIT
Homepage https://jardis.io
Informations about the package http
Jardis HTTP Client
Part of the Jardis Business Platform — Enterprise-grade PHP components for Domain-Driven Design
HTTP requests without overhead. A lean PSR-18 client built on cURL — designed for DDD applications that call external APIs, send webhooks, or integrate services. No framework, no middleware stack, no dependency bloat. Just what you need.
Why This Client?
- Two classes to learn —
HttpClient+ClientConfig. Includes its own PSR-7/PSR-17 implementation — zero external dependencies - Handler pipeline — each concern is its own invokable, orchestrated internally by the client
- Retry with backoff — automatic retry on 5xx and network errors
- PSR-18 compatible — works with any PSR-18-capable code
- 96% test coverage — integration tests against real HTTP requests, not mocks
Installation
Quick Start
GET Request
POST with JSON Body
PUT, PATCH, DELETE
Custom Headers per Request
Fully Configured
Authentication
Bearer Token
Basic Auth
Retry
Automatically retries on HTTP 5xx and transport errors (HttpClientException, which covers both NetworkException and RequestException). No retry on 4xx — those are caller errors.
Error Handling
The client does not throw exceptions on HTTP 4xx/5xx — those are valid responses. Exceptions are only thrown for actual errors:
| Exception | When |
|---|---|
NetworkException |
DNS failure, connection refused, timeout |
RequestException |
Invalid request (malformed URI) |
PSR-18 Compatible
The client implements Psr\Http\Client\ClientInterface. For full control over the request, use sendRequest():
Architecture
The user only sees HttpClient + ClientConfig. Internally, the client orchestrates a pipeline of invokable handlers — built from the config:
Each handler is an invokable object (__invoke) — independently testable, replaceable, composable. Only what is configured gets instantiated.
Custom Transport
The transport is a closure — replaceable without changing the client:
Jardis Foundation Integration
In a Jardis DDD project, the client is automatically configured via ENV:
The HttpClientHandler in JardisApp builds the client and registers it in the ServiceRegistry. Your domain code receives ClientInterface via injection — without ever importing HttpClient directly.
Development
Documentation
Full documentation, guides, and API reference:
docs.jardis.io/en/adapter/http
License
MIT License — free for any use, including commercial.
KI-gestützte Entwicklung
Dieses Package liefert einen Skill für Claude Code, Cursor, Continue und Aider mit. Installation im Konsumentenprojekt:
Mehr Details: https://docs.jardis.io/en/skills
All versions of http with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
ext-curl Version *