PHPackages                             lukaszterg/restc - 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. lukaszterg/restc

ActiveLibrary

lukaszterg/restc
================

Simple and fast rest client

00PHP

Since Jul 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lukaszterg/restc)[ Packagist](https://packagist.org/packages/lukaszterg/restc)[ RSS](/packages/lukaszterg-restc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP REST Client
===============

[](#php-rest-client)

(c) 2024

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

[](#installation)

```
$ php composer.phar require lukaszterg/restc
```

Basic Usage
-----------

[](#basic-usage)

```
$client = new Client();
$headers = array("Content-Type" => "application/x-www-form-urlencoded"); //example headers, unnecessary
$parameters = array('name'=>'Name','gender'=>'male','email'=>'email@email.com','status'=>'active'); //example parameters, unnecessary
$client->get('http://www.boredapi.com/api/activity'); //url
  echo "";
  var_dump($client->returnResponse());
  echo "";
```

Configurable Options
--------------------

[](#configurable-options)

`headers` - An associative array of HTTP headers and values to be included in every request.
`parameters` - An associative array of URL or body parameters to be included in every request.
`user_agent` - User agent string to use in requests.
`username` - Username to use for HTTP basic authentication. Requires `password`.
`password` - Password to use for HTTP basic authentication. Requires `username`.

Supported methods
-----------------

[](#supported-methods)

The tool supports methods GET, POST, PATCH, DELETE. Examples:

```
$client->get('http://www.boredapi.com/api/activity');
$client->post('https://gorest.co.in/public/v1/users',array('name'=>'Name','gender'=>'male','email'=>'email@email.com','status'=>'active'),array('Authorization'=>'Bearer '.$token));
```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

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://www.gravatar.com/avatar/72743ee1fc41636a97e1e829c561af45967cdd296849d72716b50813a0ba6a2f?d=identicon)[lukasz.jarosinski](/maintainers/lukasz.jarosinski)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lukaszterg-restc/health.svg)

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

PHPackages © 2026

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