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

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

jenchik/http
============

Fork from vinelab/http with some adjustments for own use.

1.3.0(11y ago)028MITPHPPHP &gt;=5.4

Since Jun 4Pushed 11y ago1 watchersCompare

[ Source](https://github.com/jenchik/http)[ Packagist](https://packagist.org/packages/jenchik/http)[ RSS](/packages/jenchik-http/feed)WikiDiscussions master Synced 1w ago

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

\###Forked from [vinelab/http on github.org](https://github.com/Vinelab/http)

===============

[](#httpclient)

A smart and simple HTTP client for sending and recieving JSON and XML.

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

[](#installation)

### Composer

[](#composer)

- `"jenchik/http": "dev-master"` for the latest version installation instructions.

```
// change this to point correctly according
// to your folder structure.
require './vendor/autoload.php';

use Spc\Http\Client as HttpClient;

$client = new HttpClient;

$response = $client->get('echo.jsontest.com/key/value/something/here');

var_dump($response->json());
```

### Laravel

[](#laravel)

Edit **app.php** and add `'Spc\Http\HttpServiceProvider',` to the `'providers'` array.

It will automatically alias itself as **HttpClient** so no need to alias it in your **app.php**, unless you would like to customize it - in that case edit your **'aliases'** in **app.php** adding ` 'MyHttp'	  => 'Spc\Http\Facades\Client',`

Usage
-----

[](#usage)

### GET

[](#get)

#### Simple

[](#simple)

```
	$response = HttpClient::get('http://example.org');

	// raw content
	$response->content();
```

#### With Params

[](#with-params)

```
	$request = [
		'url' => 'http://somehost.net/something',
		'params' => [

			'id'     => '12350ME1D',
			'lang'   => 'en-us',
			'format' => 'rss_200'
		]
	];

	$response = HttpClient::get($request);

	// raw content
	$response->content();

	// in case of json
	$response->json();

	// XML
	$response->xml();
```

### POST

[](#post)

```
	$request = [
		'url' => 'http://somehost.net/somewhere',
		'params' => [

			'id'     => '12350ME1D',
			'lang'   => 'en-us',
			'format' => 'rss_200'
		]
	];

	$response = HttpClient::post($request);

	// raw content
	$response->content();

	// in case of json
	$response->json();

	// XML
	$response->xml();
```

### Headers

[](#headers)

```
$response = HttpClient::get([
	'url' => 'http://some.where.url',
	'headers' => ['Connection: close', 'Authorization: some-secret-here']
]);

// The full headers payload
$response->headers();
```

### Enforce HTTP Version

[](#enforce-http-version)

```
HttpClient::get(['version' => 1.1, 'url' => 'http://some.url']);
```

### Raw Content

[](#raw-content)

```
HttpClient::post(['url' => 'http://to.send.to', 'content' => 'Whatever content here may go!']);
```

#### Custom Query String

[](#custom-query-string)

The content passed in the `content` key will be concatenated to the *URL* followed by a *?*

```
HttpClient::get(['url' => 'http://my.url', 'content' => 'a=b&c=d']);
```

> It is pretty much the same process with different HTTP Verbs. Supports `GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD`

#### TODO

[](#todo)

- Improve tests to include testing all the methods of response (like statusCode...)
- Include tests for handling bad data / errors
- Improve tests to include testing for all HTTP Verbs

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.6% 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

Unknown

Total

1

Last Release

4023d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f12891919041970c298ff89f128ab74ad95b2c21ac6c9ba0512532266da2dfe?d=identicon)[jenchik](/maintainers/jenchik)

---

Top Contributors

[![Mulkave](https://avatars.githubusercontent.com/u/2647333?v=4)](https://github.com/Mulkave "Mulkave (56 commits)")[![jenchik](https://avatars.githubusercontent.com/u/2168849?v=4)](https://github.com/jenchik "jenchik (5 commits)")[![adibhanna](https://avatars.githubusercontent.com/u/1659384?v=4)](https://github.com/adibhanna "adibhanna (3 commits)")[![dominikzogg](https://avatars.githubusercontent.com/u/1011217?v=4)](https://github.com/dominikzogg "dominikzogg (1 commits)")[![nickma42](https://avatars.githubusercontent.com/u/4164665?v=4)](https://github.com/nickma42 "nickma42 (1 commits)")[![Znarkus](https://avatars.githubusercontent.com/u/168042?v=4)](https://github.com/Znarkus "Znarkus (1 commits)")

---

Tags

httpjsonapiclientlaravelxmlcurl

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[vinelab/http

An http library developed for the laravel framework. aliases itself as HttpClient

59301.9k11](/packages/vinelab-http)[php-curl-class/php-curl-class

PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs.

3.3k9.8M372](/packages/php-curl-class-php-curl-class)[tcdent/php-restclient

A generic REST API client for PHP

3543.0M29](/packages/tcdent-php-restclient)[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)[rap2hpoutre/jacky

Opinionated REST JSON HTTP API client for laravel

174.4k](/packages/rap2hpoutre-jacky)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

162.0k](/packages/laragear-api-manager)

PHPackages © 2026

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