PHPackages                             jumbodroid/httpclient - 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. jumbodroid/httpclient

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

jumbodroid/httpclient
=====================

HttpClient is an implementation of HTTP Client for PHP and Laravel

v3.0.2(2y ago)01.5k↓50%MITPHPPHP &gt;=7.2.5

Since Aug 28Pushed 2y agoCompare

[ Source](https://github.com/jumbodroid/httpclient)[ Packagist](https://packagist.org/packages/jumbodroid/httpclient)[ RSS](/packages/jumbodroid-httpclient/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (10)Used By (0)

httpclient
==========

[](#httpclient)

**httpclient** is a PHP &amp; Laravel package, designed to help PHP developers build robust modern applications that interact with other applications and APIs in the backend to deliver experiences that users love.

**httpclient** adopts and adheres to or implements the following PHP Standards Recommendations (PSRs):

- [PSR-1](https://www.php-fig.org/psr/psr-1/)
- [PSR-7](https://www.php-fig.org/psr/psr-7/)
- [PSR-17](https://www.php-fig.org/psr/psr-17/)
- [PSR-18](https://www.php-fig.org/psr/psr-18/)

> Leverage httpclient to build modern interconnected applications for the web.

**httpclient** saves you the hustle of dealing with the more mundane and lower level APIs needed to create interconnected web applications.

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

[](#installation)

`composer require jumbodroid/httpclient`

Usage
-----

[](#usage)

### PSR-7

[](#psr-7)

PSR-7 describes common interfaces for representing HTTP messages as described in [RFC 7230](http://tools.ietf.org/html/rfc7230) and [RFC 7231](http://tools.ietf.org/html/rfc7231), and URIs for use with HTTP messages as described in [RFC 3986](http://tools.ietf.org/html/rfc3986). This package includes an implementation of [PSR-7](https://www.php-fig.org/psr/psr-7/).

#### Request | Response

[](#request--response)

Use the `getHeaderLine()` method to retrieve a header value as a string containing all header values of a case-insensitive header by name concatenated with a comma.

```
$response->withHeader('foo', 'bar')
    ->withAddedHeader('foo', 'baz');

$response->getHeaderLine('foo');
// outputs 'bar,baz'
```

Use `getHeader()` to retrieve an array of all the header values for a particular case-insensitive header by name.

```
$response->getHeader('foo');
// outputs ['bar', 'baz']
```

Note: Not all header values can be concatenated using a comma (e.g., `Set-Cookie`). When working with such headers, consumers of Request and Response classes SHOULD rely on the `getHeader()` method for retrieving such multi-valued headers.

#### Request

[](#request)

```
$request->getProtocolVersion();
$request->withProtocolVersion($version);
$request->getHeaders();
$request->hasHeader($name);
$request->getHeader($name);
$request->getHeaderLine($name);
$request->withHeader($name, $value);
$request->withAddedHeader($name, $value);
$request->withoutHeader($name);
$request->getBody();
$request->withBody(StreamInterface $body);
```

Outgoing, client-side request

```
$request->getRequestTarget();
$request->withRequestTarget($requestTarget);
$request->getMethod();
$request->withMethod($method);
$request->getUri();
$request->withUri(UriInterface $uri, $preserveHost = false);
```

Incoming, server-side request

```
$request->getServerParams();
$request->getCookieParams();
$request->withCookieParams(array $cookies);
$request->getQueryParams();
$request->withQueryParams(array $query);
$request->getUploadedFiles();
$request->withUploadedFiles(array $uploadedFiles);
$request->getParsedBody();
$request->withParsedBody($data);
$request->getAttributes();
$request->getAttribute($name, $default = null);
$request->withAttribute($name, $value);
$request->withoutAttribute($name);
```

#### Response

[](#response)

```
$response->getProtocolVersion();
$response->withProtocolVersion($version);
$response->getHeaders();
$response->hasHeader($name);
$response->getHeader($name);
$response->getHeaderLine($name);
$response->withHeader($name, $value);
$response->withAddedHeader($name, $value);
$response->withoutHeader($name);
$response->getBody();
$response->withBody(StreamInterface $body);
```

Outgoing, server-side response

```
$response->getStatusCode();
$response->withStatus($code, $reasonPhrase = '');
$response->getReasonPhrase();
```

#### Stream

[](#stream)

```
$stream->__toString();
$stream->close();
$stream->detach();
$stream->getSize();
$stream->tell();
$stream->eof();
$stream->isSeekable();
$stream->seek($offset, $whence = SEEK_SET);
$stream->rewind();
$stream->isWritable();
$stream->write($string);
$stream->isReadable();
$stream->read($length);
$stream->getContents();
$stream->getMetadata($key = null);
```

#### Uri

[](#uri)

```
$uri->getScheme();
$uri->getAuthority();
$uri->getUserInfo();
$uri->getHost();
$uri->getPort();
$uri->getPath();
$uri->getQuery();
$uri->getFragment();
$uri->withScheme($scheme);
$uri->withUserInfo($user, $password = null);
$uri->withHost($host);
$uri->withPort($port);
$uri->withPath($path);
$uri->withQuery($query);
$uri->withFragment($fragment);
$uri->__toString();
```

#### UploadedFile

[](#uploadedfile)

```
$uploadedFile->getStream();
$uploadedFile->moveTo($targetPath);
$uploadedFile->getSize();
$uploadedFile->getError();
$uploadedFile->getClientFilename();
$uploadedFile->getClientMediaType();
```

### PSR-17

[](#psr-17)

[PSR-17](https://www.php-fig.org/psr/psr-17/) describes a common standard for factories that create PSR-7 compliant HTTP objects. This package provides an implementation of PSR-17.

#### RequestFactory

[](#requestfactory)

```
RequestFactory::createRequest(string $method, $uri);
```

#### ResponseFactory

[](#responsefactory)

```
ResponseFactory::createResponse(int $code = 200, string $reasonPhrase = '');
```

#### ServerRequestFactory

[](#serverrequestfactory)

```
ServerRequestFactory::createServerRequest(string $method, $uri, array $serverParams = []);
```

#### StreamFactory

[](#streamfactory)

```
StreamFactory::createStream(string $content = '');
StreamFactory::createStreamFromFile(string $filename, string $mode = 'r');
StreamFactory::createStreamFromResource($resource);
```

#### UploadedFileFactory

[](#uploadedfilefactory)

```
UploadedFileFactory::createUploadedFile(
        StreamInterface $stream,
        int $size = null,
        int $error = \UPLOAD_ERR_OK,
        string $clientFilename = null,
        string $clientMediaType = null
    );
```

#### UriFactory

[](#urifactory)

```
UriFactory::createUri(string $uri = '');
```

### PSR-18

[](#psr-18)

**Client** - A Client is a library that implements this specification for the purposes of sending PSR-7-compatible HTTP Request messages and returning a PSR-7-compatible HTTP Response message to a Calling library.

**Calling Library** - A Calling Library is any code that makes use of a Client. It does not implement this specification's interfaces but consumes an object that implements them (a Client).

#### Client

[](#client)

```
$client->sendRequest(RequestInterface $request);
```

#### ClientException

[](#clientexception)

#### RequestException

[](#requestexception)

```
$requestException->getRequest();
```

#### NetworkException

[](#networkexception)

```
$requestException->getRequest();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Recently: every ~231 days

Total

8

Last Release

739d ago

Major Versions

v1.0.3 → v2.0.02024-02-06

v2.0.1 → v3.0.12024-05-09

PHP version history (3 changes)v1.0.0PHP ^7.2.5

v1.0.1PHP ^7.2.5|^7.3|^7.4|^8.0

v2.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/a022229f43e89bee76128c6517c55bd610b9e5dc10b3aa81f799ecfcf4e33896?d=identicon)[rayalois22](/maintainers/rayalois22)

---

Top Contributors

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

---

Tags

httpphpclientlaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jumbodroid-httpclient/health.svg)

```
[![Health](https://phpackages.com/badges/jumbodroid-httpclient/health.svg)](https://phpackages.com/packages/jumbodroid-httpclient)
```

###  Alternatives

[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.1k225.5M571](/packages/php-http-client-common)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[simpod/clickhouse-client

PHP ClickHouse Client

19116.7k](/packages/simpod-clickhouse-client)

PHPackages © 2026

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