PHPackages                             nnjeim/fetch - 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. nnjeim/fetch

ActiveLaravel-package[HTTP &amp; Networking](/categories/http)

nnjeim/fetch
============

Laravel wrapper for Guzzle client

1.1.1(4y ago)041MITPHPPHP &gt;=7.4

Since Sep 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nnjeim/fetch)[ Packagist](https://packagist.org/packages/nnjeim/fetch)[ Docs](https://github.com/nnjeim/fetch.git)[ RSS](/packages/nnjeim-fetch/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/00febf8cd7a1fb21c09c3392694c065f864890c18fd816bae46060d9d64fb59f/68747470733a2f2f65752e75692d617661746172732e636f6d2f6170692f3f6e616d653d4e616a6d2b4e6a65696d3f73697a653d313030)](https://camo.githubusercontent.com/00febf8cd7a1fb21c09c3392694c065f864890c18fd816bae46060d9d64fb59f/68747470733a2f2f65752e75692d617661746172732e636f6d2f6170692f3f6e616d653d4e616a6d2b4e6a65696d3f73697a653d313030)

Nnjeim Guzzle Wrapper
---------------------

[](#nnjeim-guzzle-wrapper)

A Laravel wrapper for the Guzzle client http library. It provides a fluent syntax to make http requests.

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

[](#installation)

You can install the package via composer:

```
composer require nnjeim/fetch

```

Configuration
-------------

[](#configuration)

```
php artisan vendor:publish --provider="Nnjeim\Fetch\FetchServiceProvider"

```

Usage
-----

[](#usage)

##### Fetch Facade

[](#fetch-facade)

```
use Nnjeim\Fetch\Fetch;

$countries = Fetch::setBaseUri('https://someapi.com')->get('countries');

```

##### FetchHelper Instantiation

[](#fetchhelper-instantiation)

```
use Nnjeim\Fetch\FetchHelper;

private $fetch;

public function __construct(FetchHelper $fetch) {

    $this->fetch = $fetch;
}

.
.
.
return $this->fetch
        ->setBaseUri('https://someapi.com')
        ->get('countries');

```

Methods
-------

[](#methods)

##### Set the headers

[](#set-the-headers)

```
Set the http headers

@return $this       setHeaders(array $headers)

```

##### Set the base uri

[](#set-the-base-uri)

```
Sets the base uri for the composition of the http request url.

@return $this       setBaseUri(string 'http://someapi.com/')

```

##### Set the request url

[](#set-the-request-url)

```
Sets the http request url.

@return $this       setUrl(string $url)

```

##### Set the request method

[](#set-the-request-method)

```
Sets the http request method.

@return $this       setMethod(string $method)

```

##### Set the request body format

[](#set-the-request-body-format)

```
Sets the request body format. The required format are 'query' | 'form_params' | 'multipart'.

@return $this       setBodyFormat(string $format)

```

##### Async request

[](#async-request)

```
Sets the type of the request to async.

@return $this       setAsync()

```

##### Get request

[](#get-request)

```
Sets the body format to query.

@return array       get(?string $url = null, ?array $data = null)

```

##### Post request

[](#post-request)

```
Sets the body format to form-params.

@return array       post(?string $url = null, ?array $data = null)

```

##### Put request

[](#put-request)

```
Sets the body format to form-params.

@return array       put(?string $url = null, ?array $data = null)

```

##### Delete request

[](#delete-request)

```
Sets the body format to query.

@return array       delete(?string $url = null, ?array $data = null)

```

##### Upload request

[](#upload-request)

```
Sets the body format to multipart.

@return array       upload(?string $url = null, ?array $data = null)

```

Response
--------

[](#response)

```
@return array

    [
        'response' => ...,
        'status' => ...,
    ];

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

1726d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/78922079?v=4)[Najm Njeim](/maintainers/nnjeim)[@nnjeim](https://github.com/nnjeim)

---

Top Contributors

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

---

Tags

guzzlehelperslaravellaravel-packagewrapperhttplaravelGuzzlelumenrequests

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nnjeim-fetch/health.svg)

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

###  Alternatives

[kozz/laravel-guzzle-provider

Guzzle 5/6 Service Provider for Laravel

651.1M2](/packages/kozz-laravel-guzzle-provider)[openapi/openapi-sdk

Minimal and agnostic PHP SDK for Openapi® (https://openapi.com)

171.4k1](/packages/openapi-openapi-sdk)[remic/guzzlecache

Laravel 5 package for caching Guzzle's GET requests.

189.3k](/packages/remic-guzzlecache)[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)
