# HTTPlug

HTTPlug, the HTTP client abstraction for PHP

Repository: https://github.com/php-http/httplug
Canonical: https://ross.abutalabs.com/products/httplug
Homepage: http://httplug.io
Language: PHP
License: MIT
License Family: permissive
Topics: php, http, http-client, httpclient, psr-18
Last push: 2025-12-10T17:09:30+00:00
Link (homepage): http://httplug.io

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 56, release rhythm 8, longevity 100
- inputs: {"age_days": 4148, "days_push": 266, "days_rel": 709, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2590, forks 40 (observed 2026-08-28T04:07:02.936965+00:00)

## What it is
HTTPlug is an HTTP client abstraction for PHP built on PSR-7 messages, defining synchronous and asynchronous client interfaces. It lets library authors decouple from specific HTTP client implementations via adapters and a plugin system for request lifecycle logic.

## Use cases
- write a reusable PHP package that needs an HTTP client without binding to Guzzle
- swap HTTP client implementations behind a common interface
- add logging or authentication plugins to HTTP requests
- make asynchronous HTTP requests in PHP
- build API client SDKs on top of PSR-7

## When to choose
- you are building a PHP library or SDK that should work with any HTTP client
- you want plugin-based request/response middleware across clients
- your project already uses PSR-7 message interfaces

## When to avoid
- you only need a simple synchronous client and can use PSR-18 directly
- you want a full-featured HTTP client rather than an abstraction layer
- your project is not PHP

## Facets
- artifact type: library
- maturity: stable
- function: http-client, middleware, plugin-system
- domain: web-development, apis, developer-tools
- platform: php
- tags: psr-7, psr-18, http-client-abstraction, async-http, composer

## Member repositories
- php-http/httplug (main) score 48
- php-http/promise (sdk) score 48
- php-http/guzzle6-adapter (plugin) score 10
- php-http/client-common (sdk) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:02.936965+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:22:19.446461+00:00, confidence not recorded.
  - readme: https://github.com/php-http/httplug (fetched 2026-08-28T04:07:02.936965+00:00, sha 2b6b3b0cedb3)
  - homepage: http://httplug.io (fetched 2026-08-29T10:04:31.282359+00:00, sha 7c43a73cf5a3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
