wingletplatform / client
Generic HTTP client infrastructure for Winglet and compatible microservices.
Requires
- php: ^8.4
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^2.0
- psr/log: ^3.0
Requires (Dev)
None
Suggests
- guzzlehttp/guzzle: PSR-18 HTTP client implementation
- http-interop/http-factory-guzzle: PSR-17 factories for Guzzle (alternatively nyholm/psr7)
Provides
None
Conflicts
None
Replaces
None
README
Framework-neutral HTTP and JSON client components for PHP 8.4 or newer on 64-bit runtimes. The package uses PSR-7/17/18 interfaces and PSR-3 logging, and does not require a web framework, Doctrine, or Winglet Core. Its Composer name is wingletplatform/client; the MIT license and Eventteri Oy copyright are included in LICENSE.
Installation
The package is not published and has no assigned release version. After an approved release is available from Packagist, install it with:
composer require wingletplatform/client:^0.1
That command is for the planned release only; it does not work against a public registry before publication. This package is separate from the historical winglet/client package and makes no claim to replace it.
Use
Construct a service client with your PSR-18 transport and PSR-17 factories, then call the API you need:
use Winglet\Client\Core\Config\TargetConfig; use Winglet\Client\Core\Http\CurlHttpClient; use Winglet\Client\Core\Http\ServiceClient; use Winglet\Client\Core\Psr17\HttpFactory; $factories = new HttpFactory(); $service = new ServiceClient( TargetConfig::fromArray(['base_url' => 'https://service.example']), new CurlHttpClient(5, 30, true), $factories, $factories, ); $response = $service->getJson('/api/v1/status');
For schema-directed JSON, pass caller-selected resource limits to CodecLimits and use JsonCodec::decodeTyped(). The codec preserves signed Int64 values as native integers on 64-bit PHP, rejects duplicate object keys, and enforces the supplied byte, depth, node, member, string, and number-token limits. The package intentionally has no production codec-limit defaults; choose limits for the service and workload you operate.
Provenance and release status
The source migration and codec provenance are documented in the source repository's migration and codec-maintenance records. Exported archives contain only the allowlisted runtime source, this README, Composer metadata, and the MIT license. The third-party codec license notice remains at src/Core/JsonCodec/LICENSE.mbolli-php-ron. The exporter removes source-development scripts and test-only Composer metadata from the archive projection while leaving the source manifest unchanged.
The PHP 8.4 and PHP 8.5 hosted archive checks recorded for earlier candidate contents do not validate later documentation or metadata edits. No public repository, release version, or registry publication is declared by this README.