PHPackages                             weew/http-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. weew/http-client

ActiveLibrary

weew/http-client
================

Extendable http client.

v1.8.0(9y ago)01642MITPHP

Since Jul 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/weew/http-client)[ Packagist](https://packagist.org/packages/weew/http-client)[ RSS](/packages/weew-http-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (26)Used By (2)

HTTP client for PHP
===================

[](#http-client-for-php)

[![Build Status](https://camo.githubusercontent.com/5ca33026838db2ae8ee6610e958ef365f83a75000ce6f60c7b287a989bf9e60c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f776565772f687474702d636c69656e742e737667)](https://travis-ci.org/weew/http-client)[![Code Quality](https://camo.githubusercontent.com/2a899b361e34bc794e25e4d33282cfd1dd70e6d31f48953c9afb57ae451206e8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f776565772f687474702d636c69656e742e737667)](https://scrutinizer-ci.com/g/weew/http-client)[![Test Coverage](https://camo.githubusercontent.com/b9690be3bbfdc90fea06d963631b20d5e067867f2927283aaf2125bf7011ad16/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f776565772f687474702d636c69656e742e737667)](https://coveralls.io/github/weew/http-client)[![Version](https://camo.githubusercontent.com/8f0e8265f4d43382bd1ea1925b9aede968e0b47127a86191a0ffa4e105e35b34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776565772f687474702d636c69656e742e737667)](https://packagist.org/packages/weew/http-client)[![Licence](https://camo.githubusercontent.com/04819e85f475304338fc40f8cb8f325be4d2ee3d1174224c973334074148eee2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f776565772f687474702d636c69656e742e737667)](https://packagist.org/packages/weew/http-client)

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Introduction](#introduction)
- [Usage](#usage)
- [Related projects](#related-projects)

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

[](#installation)

`composer require weew/http-client`

Introduction
------------

[](#introduction)

Please check out the HTTP Layer project referenced above, since it does most of the work and offers a documentation for the underlying HttpRequest and HttpResponse objects.

This library uses CURL to transfer and receive data.

Usage
-----

[](#usage)

Below is a very basic example on how to use it.

```
$client = new HttpClient();
$request = new HttpRequest(
    HttpRequestMethod::GET, new Url('http://google.com')
);

// returns an HttpResponse
$response = $client->send($request);

// send response directly to the browser (act like a proxy)
$response->send();
```

JsonClient
----------

[](#jsonclient)

There is a slightly different implementation of the `HttpClient` that is meant to be used whenever you are sure that you will always receive json responses. `JsonClient` will automatically cast `HttpResponse` to a `JsonResponse`.

```
$client = new JsonClient();
```

Related Projects
----------------

[](#related-projects)

- [URL](https://github.com/weew/url): used throughout the project.
- [HTTP Layer](https://github.com/weew/http): offers response and request objects, handles cookies, headers and much more.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity73

Established project with proven stability

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

Recently: every ~73 days

Total

25

Last Release

3369d ago

Major Versions

v0.0.13 → v1.0.02015-11-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/10b2b854b5829dd13a15967c000ed2119b5faef67aca24d94c653c8ac550d85e?d=identicon)[weew](/maintainers/weew)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/weew-http-client/health.svg)

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

PHPackages © 2026

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