PHPackages                             davidecesarano/embryo-client - 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. davidecesarano/embryo-client

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

davidecesarano/embryo-client
============================

Simple PSR-18 HTTP Client implementation.

1.0.1(5y ago)1461MITPHPPHP &gt;=7.1

Since Dec 10Pushed 5y ago2 watchersCompare

[ Source](https://github.com/davidecesarano/Embryo-Client)[ Packagist](https://packagist.org/packages/davidecesarano/embryo-client)[ Docs](https://github.com/davidecesarano/embryo-client)[ RSS](/packages/davidecesarano-embryo-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (1)

Embryo Client
=============

[](#embryo-client)

Simple PSR-18 HTTP Client.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1

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

[](#installation)

Using Composer:

```
$ composer require davidecesarano/embryo-client

```

Usage
-----

[](#usage)

You may use the `get`, `post`, `put`, `patch`, and `delete` methods provided by the Http Client factory. These methods returns an instance of `Psr\Http\Message\ResponseInterface`.

```
use Embryo\Http\Client\ClientFactory;

$http = new ClientFactory;
$response = $http->get('https://example.com/');
```

When making `POST`, `PUT`, and `PATCH` requests you may send additional data to request with an array of data as their second argument.

```
$response = $http->post('https://example.com/users', [
    'name' => 'Davide',
    'surname' => 'Cesarano'
]);
```

### Headers

[](#headers)

Headers may be added to requests using the `withHeaders` method. This method accepts an array of key / value pairs:

```
$response = $http
    ->withHeaders([
        'X-First' => 'foo',
        'X-Second' => 'bar'
    ])
    ->post('https://example.com/users', [
        'name' => 'Davide',
        'surname' => 'Cesarano'
    ]);
```

### Bearer Token

[](#bearer-token)

If you would like to quickly add a bearer token to the request's `Authorization` header, you may use the `withToken` method:

```
$response = $http
    ->withToken('token')
    ->post('https://example.com/users', [
        'name' => 'Davide',
        'surname' => 'Cesarano'
    ]);
```

### Sending a raw request body

[](#sending-a-raw-request-body)

You may use the `withJson` method if you want to provide a raw request body when making a request:

```
$response = $http
    ->withJson()
    ->post('https://example.com/users', [
        'name' => 'Davide',
        'surname' => 'Cesarano'
    ]);
```

### Attach file

[](#attach-file)

If you want to send files, you may use the `withFile` method. This method accepts the name of the field and file absolute path:

```
$response = $http
    ->withFile('file1', '/path/to/file1')
    ->withFile('file2', '/path/to/file2')
    ->post('https://example.com/upload');
```

### Timeout

[](#timeout)

With `timeout` method you may to specify the maximum number of seconds to wait for a response:

```
$response = $http
    ->withTimeout(30)
    ->get('https://example.com/users');
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

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

Total

2

Last Release

1947d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16277144?v=4)[Davide Cesarano](/maintainers/davidecesarano)[@davidecesarano](https://github.com/davidecesarano)

---

Top Contributors

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

---

Tags

phphttp clientpsr-18

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/davidecesarano-embryo-client/health.svg)

```
[![Health](https://phpackages.com/badges/davidecesarano-embryo-client/health.svg)](https://phpackages.com/packages/davidecesarano-embryo-client)
```

###  Alternatives

[juststeveking/php-sdk

A framework for building SDKs in PHP.

21872.0k2](/packages/juststeveking-php-sdk)[claude-php/claude-php-sdk

A universal, framework-agnostic PHP SDK for the Anthropic Claude API with PSR compliance

13920.7k2](/packages/claude-php-claude-php-sdk)[simpod/clickhouse-client

PHP ClickHouse Client

19116.7k](/packages/simpod-clickhouse-client)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)[amphp/http-client-psr7

PSR-7 adapter for Amp's HTTP client.

1454.7k4](/packages/amphp-http-client-psr7)

PHPackages © 2026

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