PHPackages                             restful/wrapper - 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. restful/wrapper

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

restful/wrapper
===============

A php wrapper for RESTful apis

v1.3.3(12y ago)158MITPHPPHP &gt;=5.3.0

Since Mar 22Pushed 12y ago1 watchersCompare

[ Source](https://github.com/brianpilati/restful-api-wrapper-php)[ Packagist](https://packagist.org/packages/restful/wrapper)[ Docs](http://github.com/brianpilati/restful-api-wrapper-php)[ RSS](/packages/restful-wrapper/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)DependenciesVersions (8)Used By (0)

restful-API-wrapper-php
=======================

[](#restful-api-wrapper-php)

[![Build Status](https://camo.githubusercontent.com/407c9e2497c3214a2a48bc47f1b9810e40dff5592c1688817fd190ae0d255e78/68747470733a2f2f64726f6e652e696f2f6769746875622e636f6d2f627269616e70696c6174692f7265737466756c2d6170692d777261707065722d7068702f7374617475732e706e67)](https://drone.io/github.com/brianpilati/restful-api-wrapper-php/latest)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2ea96f214042fcbc5e56dc7acc89240390a022b719042efd767fdf3fbeb0dd6e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f627269616e70696c6174692f7265737466756c2d6170692d777261707065722d7068702f6261646765732f7175616c6974792d73636f72652e706e673f733d31356463633562363635613732653964326239333035373063373836633864643739613132306666)](https://scrutinizer-ci.com/g/brianpilati/restful-api-wrapper-php/)

[![Code Coverage](https://camo.githubusercontent.com/185411dab647f1d024cfecd38a70c1608fcbd697f248f4e19abe755ace84e83b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f627269616e70696c6174692f7265737466756c2d6170692d777261707065722d7068702f6261646765732f636f7665726167652e706e673f733d61356134333937363034343263613162323136313633613433326131636233323433663533663063)](https://scrutinizer-ci.com/g/brianpilati/restful-api-wrapper-php/)

A simple php RESTful api wrapper.

Code example
------------

[](#code-example)

```
  $restful = new RESTful('https://.com///', '');
  $restful->post($path, $data);

```

Default Content-Type
--------------------

[](#default-content-type)

The default Content-Type is `application/json`

To change the default Content-Type

```
  $restful->setContentType();

```

Default URL Path Configuration and Authentication
-------------------------------------------------

[](#default-url-path-configuration-and-authentication)

The default URL Path is `///`

If you need to add a special configuration to the URL path

```
  $restful->setPathConfiguration();

```

#### Examples

[](#examples)

Firebase needs a `.json?auth=` format.

```
  $restful = new RESTful('https://.com///', '');
  $restful->setPathConfiguration('.json?auth=');
  $restful->post($path, $data);

```

Header Authentication
---------------------

[](#header-authentication)

To set the authentication in the header request

```
  $restful->setHeaderProperty('');

```

The full header property will be

```
  ': '

```

List of Library Methods
=======================

[](#list-of-library-methods)

```
delete($path)
get($path)
getHeaderLocation()
getHeaderResponseCode()
getResponseBody()
patch($path, $data)
post($path, $data)
put($path, $data)
setBaseURI($baseURI)
setContentType($contentType)
setHeaderProperty($headerProperty)
setPathConfiguration($pathConfiguration)
setTimeOut($seconds)
setToken($token)

```

Unit Tests
==========

[](#unit-tests)

All the unit tests are found in the "/tests" directory.

The RESTful tests can be executed by running the following command:

All Tests
---------

[](#all-tests)

```
$ phpunit

```

Test Groups
-----------

[](#test-groups)

```
$ phpunit --group

```

Single Test
-----------

[](#single-test)

```
$ phpunit tests/unit/

```

I started with the firebase-php library (). Tamas' code is simply amazing! I helped him write the tests and the test stub. I reached out to him to fork and abstract the code but I never received a response.

-- Firebase PHP Class &amp; Client Library --
=============================================

[](#---firebase-php-class--client-library---)

@author Tamas Kalman

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

7

Last Release

4425d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78ba323ff4330630b0b7e517cbd0d8449b3a3e65111004d2acda37879d7cd177?d=identicon)[brianpilati](/maintainers/brianpilati)

---

Top Contributors

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

---

Tags

apirestwrapper

### Embed Badge

![Health badge](/badges/restful-wrapper/health.svg)

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

PHPackages © 2026

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