PHPackages                             xrobau/pest - 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. xrobau/pest

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

xrobau/pest
===========

A proper REST client for PHP. (Forked from abandoned Educoder/pest)

1.0.0(10y ago)1201MITPHPPHP &gt;=5.2

Since Jun 8Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (0)

Pest
====

[](#pest)

**Pest** is a PHP client library for [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer)web services.

Unlike [Zend\_Rest\_Client](http://framework.zend.com/manual/en/zend.rest.client.html), which is not really a "REST" client at all (more like RPC-over-HTTP), Pest supports the four REST verbs (GET/POST/PUT/DELETE) and pays attention to HTTP response status codes.

Composer Installation
---------------------

[](#composer-installation)

To install Pest, use the following composer `require` statement:

```
{
    "require": {
        "xrobau/pest": "1.0.0"
    }
}

```

Basic Example
-------------

[](#basic-example)

Pest's get/post/put/delete() return the raw response body as a string. See the info on PestXML (below) if you're working with XML-based REST services and PestJSON if you're working with JSON.

```

```

Responses with error status codes (4xx and 5xx) raise exceptions.

```
