PHPackages                             givanov95/typed-http - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. givanov95/typed-http

ActiveLibrary[HTTP &amp; Networking](/categories/http)

givanov95/typed-http
====================

A typed HTTP request/response library for PHP

v1.1.1(1mo ago)030MITPHPPHP ^8.2

Since Nov 11Pushed 1mo agoCompare

[ Source](https://github.com/givanov95/typed-http)[ Packagist](https://packagist.org/packages/givanov95/typed-http)[ RSS](/packages/givanov95-typed-http/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (8)Versions (5)Used By (0)

TypedHttp
=========

[](#typedhttp)

TypedHttp is a typed PHP HTTP request/response library designed to simplify building HTTP requests, parsing responses, and handling authentication.

Features
--------

[](#features)

- Abstract base Request class for typed HTTP requests
- Extensible authentication mechanisms (BasicAuth, Certificate, etc.)
- Support for various Content-Type and response formats
- Clear and informative exception handling
- Easily extendable for custom API integrations

Request parameters are automatically gathered from the **public properties declared in your extending request class**. You simply declare the parameters as public properties in your class, and the library handles collecting and sending them with your request, keeping your code clean and simple.

Installation
------------

[](#installation)

```
composer require givanov95/typed-http

use Givanov95\TypedHttp\Requests\Request;
use Givanov95\TypedHttp\Requests\Authorization\BasicAuth\BasicAuthAuthenticator;
use Givanov95\TypedHttp\Requests\Authorization\AuthenticatorInterface;

class MyRequest extends Request implements BasicAuthInterface
{
    // Required param for the request
    public string $param1 = null;

    // Optional param for the request
    public ?int $param2 = null;

    public function __construct(
        ?string $param1 = null,
        ?int $param2 = null
    )
    {
        parent::__construct();

        $this->param1 = $param1;
        $this->param2 = $param2;
    }

    public function getAuthenticator(): BasicAuthAuthenticator
    {
        return new BasicAuthAuthenticator('username', 'password');
    }

    public function getUrl(): Url
    {
        return new Url('https://api.example.com/data');
    }

    protected function getHttpMethodType(): HttpMethod
    {
        return HttpMethod::POST;
    }

    protected function getContentType(): ContentType
    {
        return ContentType::JSON;
    }

    protected function getExpectedResponseFormat(): ExpectedResponseFormat
    {
        return ExpectedResponseFormat::JSON;
    }
}

// Params are set via public properties declared in your extending Request class
$request = new MyRequest(param1: 'value1', param2: 42);
$response = $request->executeRequest();
$data = $request->getParsedBody();

print_r($data);
```

Tests
-----

[](#tests)

Tests are not included yet but will be added in future releases to ensure quality and reliability.

Examples
--------

[](#examples)

More example scripts and detailed usage scenarios will be added soon to help you get started quickly.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance92

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~65 days

Total

4

Last Release

38d ago

Major Versions

v0.1.11-alpha → v1.0.02026-05-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63155374?v=4)[givanov95](/maintainers/givanov95)[@givanov95](https://github.com/givanov95)

---

Top Contributors

[![givanov95](https://avatars.githubusercontent.com/u/63155374?v=4)](https://github.com/givanov95 "givanov95 (15 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/givanov95-typed-http/health.svg)

```
[![Health](https://phpackages.com/badges/givanov95-typed-http/health.svg)](https://phpackages.com/packages/givanov95-typed-http)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[guzzlehttp/guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.

25711.0M191](/packages/guzzlehttp-guzzle-services)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
