PHPackages                             rokde/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. [HTTP &amp; Networking](/categories/http)
4. /
5. rokde/http-client

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

rokde/http-client
=================

A http client library without any dependencies. Just vanilla php.

1.1.0(7y ago)11221MITPHPPHP ^7.1

Since Jul 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/rokde/http-client)[ Packagist](https://packagist.org/packages/rokde/http-client)[ RSS](/packages/rokde-http-client/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

http client
===========

[](#http-client)

[![Latest Stable Version](https://camo.githubusercontent.com/dc4cf737232e8bafd045262739ed3be5e10c695e90a11296efb6bea69a0a9348/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f687474702d636c69656e742f762f737461626c652e737667)](https://packagist.org/packages/rokde/http-client) [![Latest Unstable Version](https://camo.githubusercontent.com/e6067e7b311dd814c81ecace2f3ff023720f0d3bb94e821d36ae7dc49c171fef/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f687474702d636c69656e742f762f756e737461626c652e737667)](https://packagist.org/packages/rokde/http-client) [![License](https://camo.githubusercontent.com/de111679dfb333bb061c4129b8b60307063c880db0c411590bcc2455b89173bc/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f687474702d636c69656e742f6c6963656e73652e737667)](https://packagist.org/packages/rokde/http-client) [![Total Downloads](https://camo.githubusercontent.com/0553701329ef4324905427f4df5c927e9719888cde0ad291400014f88c1fba79/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f687474702d636c69656e742f646f776e6c6f6164732e737667)](https://packagist.org/packages/rokde/http-client)

This http client library does not have any dependencies like curl or guzzle. It uses plain php functions to handle the most common http requests.

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

[](#installation)

```
composer require rokde/http-client

```

Usage
-----

[](#usage)

You have two options

1. Use the helper function `http()`
2. Use the full-blown class stack provided by the package

I recommend the use of the `http()` function to keep the packages purpose in mind: simplicity.

### Using `http()`

[](#using-http)

```
// GET (get from uri)
/** @var string $response */
$response = http('https://httpbin.org/get');

// POST (post data to uri)
/** @var \Rokde\HttpClient\Response $response */
$response = http()->post(['data' => 'value'], 'https://httpbin.org/post');
```

### Using the class version

[](#using-the-class-version)

```
$client = new \Rokde\HttpClient\Client();

$request = new \Rokde\HttpClient\Request('https://httpbin.org/get', 'GET', [
  'accept' => 'application/json',
  'x-verify-test' => 'true',
]);

$response = $client->send($request);

if ($response->isOk()) {
  $resultString = $response->content();
}
```

Further usage examples can be found at the `/tests` folder of this package.

### Testing

[](#testing)

Run the tests with:

```
composer test

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

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

Total

5

Last Release

2665d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4946056?v=4)[Robert Kummer](/maintainers/rokde)[@rokde](https://github.com/rokde)

---

Tags

fetch-apihttp-clienthttp-requests

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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