PHPackages                             fenzland/http-api-gluer - 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. [API Development](/categories/api)
4. /
5. fenzland/http-api-gluer

ActiveLibrary[API Development](/categories/api)

fenzland/http-api-gluer
=======================

0.2.0(8y ago)03511MITPHPPHP &gt;=7.1.0

Since Mar 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Fenzland/http-api-gluer)[ Packagist](https://packagist.org/packages/fenzland/http-api-gluer)[ RSS](/packages/fenzland-http-api-gluer/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (1)

HTTP API Gluer
==============

[](#http-api-gluer)

A library for calling HTTP API, and avoid hard code about details of specific API.

Usage
-----

[](#usage)

```
composer require fenzland/http-api-gluer
```

Create instance of Gluer.

```
use Fenzland\HttpApiGluer\Gluer;
use Fenzland\DataParser\Transformer;

$gluer= new Gluer(
	'https://url'           // URL of API.
,
	'POST'                  // Method of API.
,
	$request_transformer    // instance of Transformer.
,
	$response_transformer   // instance of Transformer.
,
	'application/json'      // content type of request
,
	'application/json'      // content type of response (optional if same with content type of request)
);

// or

$gluer= Gluer::make_(
	'https://url/{path_param}'
,
	'POST'
,
	$request_transformer_meta    // meta array of Transformer.
,
	$response_transformer_meta   // meta array of Transformer.
,
	'application/json'
);
```

Call api.

```
$result= $gluer->call( $data );
```

Account Types
-------------

[](#account-types)

### Built-in supported

[](#built-in-supported)

- application/octet-stream
- application/php-serialized
- application/json
- application/x-www-form-urlencoded

### Extending

[](#extending)

```
use Fenzland\HttpApiGluer\serializers\ASerializer

class CustomSerializer extends ASerializer
{
	public function encode( $data ):string
	{
		# ...
	}

	public function decode( string$encoded )
	{
		# ...
	}
}

Gluer::registerSerializer_( 'custom/mime', CustomSerializer::class );
// or
Gluer::registerSerializer_( 'custom/mime', new CustomSerializer );
```

About Transformer
-----------------

[](#about-transformer)

Preliminary: [fenzland/data-parser](https://github.com/Fenzland/data-parser)

### Request Transformer

[](#request-transformer)

```
[
	'path'=> ...,     // parameters in path example: https://github.com/{name}/{repo}
	'query'=> ...,    // parameters in url query example: ?key0=value0&key1=value1
	'headers'=> ...,  // parameters in header
	'body'=> ...,     // parameters or data in body
];
```

### Response Transformer

[](#response-transformer)

```
[
	"foo_in_header"=> [
		'type'=> 'value',
		'keys'=> [ 'headers', "foo", ],
	],
	"bar_in_body"=> [
		'type'=> 'value',
		'keys'=> [ 'body', "bar", "baz", ],
	],
];
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

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 ~2 days

Total

2

Last Release

2967d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4088943a17e5d5e92ecb0196b9b2970af09cf5b3e1b8b67443c79169878f3cbe?d=identicon)[Fenzland](/maintainers/Fenzland)

---

Top Contributors

[![Fenzland](https://avatars.githubusercontent.com/u/19697989?v=4)](https://github.com/Fenzland "Fenzland (18 commits)")

### Embed Badge

![Health badge](/badges/fenzland-http-api-gluer/health.svg)

```
[![Health](https://phpackages.com/badges/fenzland-http-api-gluer/health.svg)](https://phpackages.com/packages/fenzland-http-api-gluer)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M477](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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