PHPackages                             booosta/rest - 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. [API Development](/categories/api)
4. /
5. booosta/rest

ActiveLibrary[API Development](/categories/api)

booosta/rest
============

REST API client for the Booosta Framework

v4.0.4(5mo ago)0223LGPL-3.0-onlyPHPPHP &gt;=8.0.0

Since Feb 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/buzanits/booosta-rest)[ Packagist](https://packagist.org/packages/booosta/rest)[ RSS](/packages/booosta-rest/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (6)Used By (3)

REST API client for the Booosta Framework
=========================================

[](#rest-api-client-for-the-booosta-framework)

This modules provides a REST client for PHP Booosta to send REST requests to a server.

Booosta allows to develop PHP web applications quick. It is mainly designed for small web applications. It does not provide a strict MVC distinction. Although the MVC concepts influence the framework. Templates, data objects can be seen as the Vs and Ms of MVC.

Up to version 3 Booosta was available at Sourceforge:  From version 4 on it resides on Github and is available from Packagist under booosta/booosta .

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

[](#installation)

This module can be used inside the Booosta framework. If you want to do so, install the framework first. See the [installation instructions](https://github.com/buzanits/booosta-installer) for accomplishing this. If your Booosta is installed, you can install this module.

You also can use this module in your standalone PHP scripts. In both cases you install it with:

```
composer require booosta/rest

```

Usage in the Booosta framework
------------------------------

[](#usage-in-the-booosta-framework)

To use the REST functions, extend the `Application` object:

```
class MyREST extends \booosta\rest\Application
{
  protected $url = 'https://api.football-data.org/v4/';

  public function run()
  {
    // the following requests https://api.football-data.org/v4/competitions
    return $this->get('competitions');
  }
}

```

To use this class in the Booosta Framework do:

```
$rest = $this->makeInstance('MyREST');
print_r($rest->run());

```

Usage as standalone Module:
---------------------------

[](#usage-as-standalone-module)

```
$rest = new MyREST();
print_r($rest->run());

```

Functions
---------

[](#functions)

```
// Submits a GET request to "$url$uri". If $raw is false, an array is returned, otherwise the JSON code
$this->get($uri, $raw = false);

// As get, but uses "$uri" instead of "$url$uri" ($url is the protected class variable)
$this->get_url($uri, $raw = false);

// Submits a POST request. $data has to be an array
$this->post($uri, $data, $raw = false);

// Submits a PUT request.
$this->put($uri, $data, $raw = false);

// Submits a DELETE request
$this->delete($uri);

// Sets optional username and password in the request. Call this before submitting a request.
$this->set_credentials($username, $password);

```

Inside your functions (in the above expamle `run()`) you can manipulate the REST clients behaviour:

```
// Sets request headers. Array with header name in the key and header value in the value.
$this->headers = $my_header_array;
// Example:
$this->headers = ['Content-Type' => 'application/json'];

```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance81

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

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

Total

5

Last Release

161d ago

Major Versions

v1.0.0 → v4.0.22023-02-14

v1.0.1 → v4.0.32024-10-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9774538?v=4)[Peter Buzanits](/maintainers/buzanits)[@buzanits](https://github.com/buzanits)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/booosta-rest/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

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