PHPackages                             denismitr/net-call - 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. denismitr/net-call

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

denismitr/net-call
==================

Easy to use and mockable HTTP client, wraps most common http calls functionality around Guzzle.

v0.1(8y ago)4102MITPHPPHP &gt;=7.0

Since Jan 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/denismitr/net-call)[ Packagist](https://packagist.org/packages/denismitr/net-call)[ RSS](/packages/denismitr-net-call/feed)WikiDiscussions master Synced 3d ago

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

NetCall
=======

[](#netcall)

NetCall is a convenient and easy to use HTTP client. It is a wrapper around Guzzle, made for most common use cases. And is designed to make development and testing easier and more pleasant.

### Author

[](#author)

Denis Mitrofanov

### Installation

[](#installation)

```
composer require denismitr/net-call
```

### Usage

[](#usage)

```
$response = NetCall::new()->get('http://www.google.com?foo=bar');

// NetCallResponseInterface methods
$response->body(); // : string
$response->json(); // : array
$response->header('some-key');
$response->headers(); // : array
$response->status(); // : int
$response->isSuccess(); // : bool
$response->isOk(); // : bool
$response->isRedirect(); // : bool
$response->isServerError(); // : bool
```

```
// request params will be json encoded by default
$response = NetCall::new()->post('http://test.com/post', [
    'foo' => 'bar',
    'baz' => 'qux',
]);

$response->json();
// array with json response data
```

From Params

```
$response = NetCall::new()->asFormData()->post('http://myurl.com/post', [
    'foo' => 'bar',
    'baz' => 'qux',
]);
```

Multipart

```
$response = NetCall::new()->asMultipart()->post('http://myurl.com/multi-part', [
    [
        'name' => 'foo',
        'contents' => 'bar'
    ],
    [
        'name' => 'baz',
        'contents' => 'qux',
    ],
    [
        'name' => 'test-file',
        'contents' => 'test contents',
        'filename' => 'test-file.txt',
    ],
]);
```

With Headers

```
$response = NetCall::new()
    ->withHeaders(['Custom' => 'Header'])
    ->get('http://myurl.com/get');
```

Set Accept header

```
$response = NetCall::new()
    ->accept('application/json')
    ->post('http://myurl.com/post');
```

Patch requests are supported

```
$response = NetCall::new()->patch('http://myurl.com/patch', [
    'foo' => 'bar',
    'baz' => 'qux',
]);
```

### Exceptions

[](#exceptions)

Exceptions are not thrown on 4xx and 5xx: use response status method instead.

### Redirects

[](#redirects)

Redirects are followed by default

To disable that:

```
$response = NetCall::new()->noRedirects()->get('http://myurl.com/get');

$response->status(); // 302
$response->header('Location'); // http://myurl.com/redirected
```

### Auth

[](#auth)

Basic auth

```
$response = NetCall::new()
    ->withBasicAuth('username', 'password')
    ->get('http://myurl.com/basic-auth');
```

Digest auth

```
$response = NetCall::new()
    ->withDigestAuth('username', 'password')
    ->get('http://myurl.com/digest-auth');
```

### Timeout

[](#timeout)

Set timeout

```
NetCall::new()->timeout(1)->get('http://myurl.com/timeout');

// If more then a second passes
// \Denismitr\NetCall\Exceptions\NetCallException is thrown
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

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

Total

2

Last Release

3037d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d68ae5d5ca94f49a69f961a7825865d92247b09e276a25fcc6ad485d4c8c964?d=identicon)[denismitr](/maintainers/denismitr)

---

Top Contributors

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

---

Tags

httphttp-clienthttp-requesthttprequestclientGuzzle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/denismitr-net-call/health.svg)

```
[![Health](https://phpackages.com/badges/denismitr-net-call/health.svg)](https://phpackages.com/packages/denismitr-net-call)
```

###  Alternatives

[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)[amphp/http-client-guzzle-adapter

Guzzle adapter for Amp's HTTP client.

1523.6k1](/packages/amphp-http-client-guzzle-adapter)[opgg/riotquest

RiotQuest, PHP RiotAPI client library that focused on multi request from OP.GG

172.6k](/packages/opgg-riotquest)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

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