Search by

smithy / http

stobrien89smithy

PSR-7 HTTP messages and a PSR-18 cURL client for Smithy PHP.

0.1.0-RC.5 2026-11-27 19:05 UTC

This package is auto-updated.

Last update: 2026-11-27 19:55:32 UTC


README

PSR-7 messages and a PSR-18 cURL client for Smithy PHP, with fiber-aware concurrency, bounded body streaming, cancellation, and response checksum validation. Requires PHP 8.2 or later and the cURL extension.

This repository is a read-only split of smithy-lang/smithy-php. Send issues and pull requests to the monorepo.

Installation

composer require smithy/http

Sending Requests

use Smithy\Http\Client\CurlClient;
use Smithy\Http\Message\Request;

$client = new CurlClient();
$response = $client->sendRequest(
    new Request('GET', 'https://example.com/status')
);

echo $response->getStatusCode();

Components

Component Responsibility
Client CurlClient, connection limits, TLS, cancellation, and trailers
Message PSR-7 request, response, URI, and stream types
Checksum Response checksum validation for streamed bodies

Dependencies

This package builds on smithy/async, smithy/core, psr/http-client, and psr/http-message.

Design

See HTTP Runtime Design.

Contributing

Run the component tests from the monorepo root:

vendor/bin/phpunit tests/Http