# php-http/client-common

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/php-http-client-common).**

1,050 stars · 53 forks · PHP · MIT

## Links

- GitHub: https://github.com/php-http/client-common
- Homepage: http://httplug.io
- awesome-repositories: https://awesome-repositories.com/repository/php-http-client-common.md

## Description

This library provides a standardized abstraction layer for PHP HTTP clients, enabling consistent request handling across diverse network transport implementations. It serves as a foundational toolkit for developers to manage network communication through unified interfaces, ensuring that application logic remains decoupled from specific underlying transport libraries.

The project distinguishes itself through a decorator-based pipeline and a plugin-driven lifecycle system. These mechanisms allow for the interception and modification of request and response data, as well as the injection of custom logic for cross-cutting concerns like authentication and logging, without requiring changes to the core transport layer.

Beyond these core patterns, the library includes utilities for parallel request execution to minimize latency when interacting with multiple external sources. It also provides a fluent builder interface and shorthand methods for standard HTTP verbs to reduce boilerplate code during the construction and dispatch of network requests.

## Tags

### Software Engineering & Architecture

- [HTTP Client Adapters](https://awesome-repositories.com/f/software-engineering-architecture/integration-adapters/http-client-adapters.md) — Standardizes how applications interact with various network libraries by using consistent adapters that hide underlying implementation details.
- [Adapter Patterns](https://awesome-repositories.com/f/software-engineering-architecture/adapter-patterns.md) — Implements design patterns to wrap existing classes and provide compatible interfaces for diverse network transports.
- [Client Plugin Systems](https://awesome-repositories.com/f/software-engineering-architecture/plugin-based-extensibility/client-plugin-pipelines/client-plugin-systems.md) — Provides a framework for injecting custom logic into the request lifecycle to handle cross-cutting concerns.

### Networking & Communication

- [HTTP Client Interfaces](https://awesome-repositories.com/f/networking-communication/http-client-interfaces.md) — Provides standardized interfaces for sending structured HTTP requests to remote services.
- [Concurrent HTTP Clients](https://awesome-repositories.com/f/networking-communication/concurrent-http-clients.md) — Executes multiple HTTP requests in parallel to optimize network retrieval and connection reuse.
- [Fluent HTTP Request Configuration](https://awesome-repositories.com/f/networking-communication/fluent-http-request-configuration.md) — Offers a builder pattern allowing sequential method calls to configure HTTP request parameters.
- [Parallel Request Executions](https://awesome-repositories.com/f/networking-communication/http-request-customization/request-execution/parallel-request-executions.md) — Sends multiple HTTP requests concurrently using thread-based or event-driven mechanisms to reduce total wait time.
- [Request and Response Modifiers](https://awesome-repositories.com/f/networking-communication/network-clients/custom-client-integrations/tunnel-protocol-extensions/request-and-response-modifiers.md) — Wraps HTTP clients to intercept, modify, or extend request and response behavior through a unified interface.

### Web Development

- [HTTP Middleware Pipelines](https://awesome-repositories.com/f/web-development/request-middleware-pipelines/http-middleware-pipelines.md) — Provides middleware chains that intercept and transform HTTP requests and responses for custom behavior like logging or authentication.
- [Request Pipelines](https://awesome-repositories.com/f/web-development/request-pipelines.md) — Provides an architectural pattern for intercepting and modifying network requests through sequential lifecycle hooks.
- [Intercepting HTTP Clients](https://awesome-repositories.com/f/web-development/http-request-interceptors/intercepting-http-clients.md) — Wraps existing network clients with interceptor chains for centralized request and response processing. ([source](https://github.com/php-http/client-common#readme))
- [Request Lifecycle Hooks](https://awesome-repositories.com/f/web-development/request-lifecycle-hooks.md) — Supports a plugin system to inject custom logic into the request and response lifecycle for handling tasks like logging or authentication. ([source](http://httplug.io/))

### Development Tools & Productivity

- [Plugin Lifecycle Hooks](https://awesome-repositories.com/f/development-tools-productivity/lifecycle-hook-management/plugin-lifecycle-hooks.md) — Triggers custom scripts during specific stages of the plugin lifecycle to handle cross-cutting concerns.
