PHPackages                             pjdietz/wellrested - 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. pjdietz/wellrested

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

pjdietz/wellrested
==================

Simple PHP Library for RESTful APIs

v1.3.1(12y ago)0319MITPHPPHP &gt;=5.3.0

Since Aug 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/wellrestedphp/wellrested2)[ Packagist](https://packagist.org/packages/pjdietz/wellrested)[ Docs](https://github.com/pjdietz/wellrested)[ RSS](/packages/pjdietz-wellrested/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

WellRESTed
==========

[](#wellrested)

[![Build Status](https://camo.githubusercontent.com/909bf63daa1b4e18b1a7bdef217415faa2b4d5a16acabc8c6e9592440d36a3b5/68747470733a2f2f7472617669732d63692e6f72672f706a646965747a2f77656c6c7265737465642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pjdietz/wellrested)

WellRESTed is a micro-framework for creating RESTful APIs in PHP. It provides a lightweight yet powerful routing system and classes to make working with HTTP requests and responses clean and easy.

Requirements
------------

[](#requirements)

- PHP 5.3
- [PHP cURL](http://php.net/manual/en/book.curl.php) for making requests with the [`Client`](src/pjdietz/WellRESTed/Client.php) class (Optional)

Install
-------

[](#install)

Add an entry for "pjdietz/wellrested" to your composer.json file's `require` property. If you are not already using Composer, create a file in your project called "composer.json" with the following content:

```
{
    "require": {
        "pjdietz/wellrested": "~2.3"
    }
}
```

Use Composer to download and install WellRESTed. Run these commands from the directory containing the **composer.json** file.

```
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
```

You can now use WellRESTed by including the `vendor/autoload.php` file generated by Composer.

Overview
--------

[](#overview)

WellRESTed's primary goal is to facilitate mapping of URIs to classes that will provide or accept representations. To do this, create a [`Router`](src/pjdietz/WellRESTed/Router.php) instance and load it up with some routes.

```
use pjdietz\WellRESTed\Response;
use pjdietz\WellRESTed\Router;

require_once "vendor/autoload.php";

// Create a new router.
$router = new Router();

// Populate the router with routes.
$router->add(
    ["/", "\\MyApi\\RootHandler"],
    ["/cats/", "\\MyApi\\CatHandler"],
    ["/dogs/*", "\\MyApi\\DogHandler"],
    ["/guinea-pigs/{id}", "\\MyApi\\GuineaPigHandler"],
    ["~/hamsters/([0-9]+)~", "\\MyApi\\HamsterHandler"]
);

// Output a response based on the request sent to the server.
$router->respond();
```

Documentation
-------------

[](#documentation)

See [the documentation](http://wellrested.readthedocs.org/en/stable/) to get started.

Copyright and License
---------------------

[](#copyright-and-license)

Copyright © 2015 by PJ Dietz Licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.1% 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

Unknown

Total

1

Last Release

4649d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51c270797760b2893b6300c7efa1a4d3ef117771f901debea3954d947201e51e?d=identicon)[pjdietz](/maintainers/pjdietz)

---

Top Contributors

[![pjdietz](https://avatars.githubusercontent.com/u/1231859?v=4)](https://github.com/pjdietz "pjdietz (212 commits)")[![eatonphil](https://avatars.githubusercontent.com/u/3925912?v=4)](https://github.com/eatonphil "eatonphil (10 commits)")[![nthdesign](https://avatars.githubusercontent.com/u/1248170?v=4)](https://github.com/nthdesign "nthdesign (1 commits)")

---

Tags

httpapirestcurlrestful

### Embed Badge

![Health badge](/badges/pjdietz-wellrested/health.svg)

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

###  Alternatives

[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[voku/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

16183.9k1](/packages/voku-httpful)[msankhala/parsehub-php

Php wrapper classes for Parsehub REST api.

1312.4k](/packages/msankhala-parsehub-php)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[wellrested/wellrested

Simple PHP Library for RESTful APIs

4818.7k4](/packages/wellrested-wellrested)

PHPackages © 2026

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