PHPackages                             syluxso/requiem - 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. syluxso/requiem

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

syluxso/requiem
===============

HTTP requests that are easy to use and extend.

142PHP

Since Apr 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Syluxso/Requiem)[ Packagist](https://packagist.org/packages/syluxso/requiem)[ RSS](/packages/syluxso-requiem/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Requiem
=======

[](#requiem)

INSTALL
-------

[](#install)

```
composer require syluxso/requiem

```

### GOAL

[](#goal)

- Make api calls that are simple to read and write.
- Simple implementation of defaults for setting headers, auth, etc.
- Access the response $status, $message, $data, $errors with ease.
- Permit for a platform specific drivers to be pre-configured for each api endpoint.

### CLASSES

[](#classes)

- Requiem: Example class to extend RequiemAPi
- RequiemApi: The main class drive them all.
- RequiemGuzzle: The class that consumes RequiemApi set up, implements Guzzle call, and returns the call through the RequiemResponse class.
- RequiemResponse: Takes the data from a $guzzle-&gt;getResponse() and processes it.
- Utils: Helper functions.

### REQUIREMENTS

[](#requirements)

- Requires Guzzle
- PHP 8.x

### EXAMPLE: Make calls

[](#example-make-calls)

```
// The most simple call
$r = new Requiem('https://api.test.com/get');
$r->call();

var_dump(
  $r->status(),  // 200
  $r->message(), // OK
  $r->data(),    // array|object of data response.
  $r->errors()  // null (unless there are errors.
);
```

```
// Add query params
$r = new Requiem('https://api.test.com/get');
$r->add_query('foo', 'bar'); // adds ?foo=bar to the request url string.
$r->call();
```

```
// Add headers
$r = new Requiem('https://api.test.com/get');
$r->add_header('Content-Type', 'application/json'); // Adds header.
$r->call();
```

```
// Change the request method
$r = new Requiem('https://api.test.com/get');
$r->method('post');
$r->call();
```

```
// Add body content
$r = new Requiem('https://api.test.com/get');
$r->add_body($array); // Array/Objects converted to json body.
$r->call();
```

```
// A few helpers
$r = new Requiem('https://api.test.com/get');
$r->basic_auth($user, $pass); // Simple basic auth.
$r->bearer_auth($token);
$r->use_json(); // This is added by default and adds the Content Type to the header.
$r->call();
```

```
// User $root and $routes
$r = new Requiem('/resource/endpoint');
$r->roote('https://api.test.com');
$r->call();
```

### EXAMPLE: Access the response &amp; errors.

[](#example-access-the-response--errors)

```
$r = new Requiem('https://api.test.com/get');
$r->call();
$status_code = $r->status(); // '200'
$status_message = $r->message(); // 'OK'
$response_data = $r->data(); // Array or Object body of the api response.
$errors = $r->errors(); // $error code(s)
```

### EXAMPLE: Extend with defaults

[](#example-extend-with-defaults)

```
class CustomPostRequiem {
  function __construct($route) {
    $this->root('https://api.myendpoing.com');
    $this->route($route);
    $this->method('post');
    $this->basic_auth(env('USER_ID', env('USER_PASS')));
    $this->add_query('api_token', env('API_TOKEN'));
  }
}

$r = new CustomPostRequiem('/my-route');
$r->call();

class CustomGetRequiem {
  function __construct($route) {
    $this->root('https://api.myendpoing.com');
    $this->route($route);
    $this->method('get');
    $this->basic_auth(env('USER_ID', env('USER_PASS')));
    $this->add_query('api_token', env('API_TOKEN'));
  }
}

$r = new CustomGetRequiem('/my-route');
$r->call();
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68607411?v=4)[Syluxso](/maintainers/Syluxso)[@Syluxso](https://github.com/Syluxso)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/syluxso-requiem/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

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

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/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

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

PHPackages © 2026

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