PHPackages                             jaenmedina/php-rest-client - 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. jaenmedina/php-rest-client

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

jaenmedina/php-rest-client
==========================

A PHP REST Client.

0.3.0(8y ago)123MITPHPPHP &gt;=5.4

Since Apr 23Pushed 8y ago1 watchersCompare

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

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

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

[](#php-rest-client)

[![Build Status](https://camo.githubusercontent.com/1e5275728891bf85d2830f3162082a83d027db5d972028df49f6b8d3c01bb84e/68747470733a2f2f7472617669732d63692e6f72672f736f6674696369656c2f7068702d726573742d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/softiciel/php-rest-client)[![Codacy Badge](https://camo.githubusercontent.com/ce381599cfa8e923fcaf9620b5bca6681e63b910c432fe7862c9f7edba21018e/68747470733a2f2f7777772e636f646163792e636f6d2f70726f6a6563742f62616467652f3664623338623137316335343439316438363635343666393561373333313266)](https://www.codacy.com/app/jaen-medina/php-rest-client)[![Code Climate](https://camo.githubusercontent.com/8cf3c468c30d10f21b7fd119bbe3753995ca1ebe8040f35b20f9866d703f1a73/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f736f6674696369656c2f7068702d726573742d636c69656e742f6261646765732f6770612e737667)](https://codeclimate.com/github/softiciel/php-rest-client)

A PHP REST Client.

Version
-------

[](#version)

0.1.0

Install with composer
---------------------

[](#install-with-composer)

Add the package dependency softiciel/php-rest-client in your composer.json

```
{
    "require": {
        "softiciel/php-rest-client": "0.3.0"
    }
}
```

How to use?
-----------

[](#how-to-use)

Just instantiate the method you want to execute. There is support for GET, POST, PUT HEAD, DELETE and OPTIONS methods.

For GET method:

```
$url = 'http://www.example.com';
$getMethod = new Get($url);
$result = $getMethod->execute();
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'.
```

For POST method:

```
$url = 'https://httpbin.org/post';
$postMethod = new Post($url);
$postMethod->setParameter('text', 'Read these tips to improve');
$result = $postMethod->execute();
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'.
```

For PUT method:

```
$url = 'https://httpbin.org/put';
$putMethod = new Put($url);
$data = 'Test data';
$result = $putMethod->execute($data);
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'.
```

For HEAD method:

```
$url = 'http://www.example.com';
$headMethod = new Head($url);
$result = $headMethod->execute();
print_r($result); // Will print the array with keys 'status', 'time', 'header', and 'error'.
```

For OPTIONS method:

```
$url = 'http://www.example.com';
$optionsMethod = new Options($url);
$result = $optionsMethod->execute();
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'
```

For DELETE method:

```
$url = 'https://httpbin.org/DELETE';
$deleteMethod = new Delete($url);
$result = $deleteMethod->execute();
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'
```

For custom method:

```
$url = 'http://www.example.com';
$customMethod = new CustomMethod($url);
$result = $customMethod->execute('EXECUTE');
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'
```

You can also use the RestClient class:

```
$result = RestClient::execute([
    'method' => 'get',
    'url' => 'www.example.org'
]);
print_r($result); // Will print the array with keys 'status', 'time', 'header', 'body' and 'error'
```

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

3239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2059d2965e7a2df8c58972e303a281b14bb35d5eeace1ae0f72cb8fc4d070587?d=identicon)[jaenmedina](/maintainers/jaenmedina)

---

Top Contributors

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

---

Tags

httpphpclientrestcurl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jaenmedina-php-rest-client/health.svg)

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

PHPackages © 2026

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