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

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

educoder/pest
=============

A proper REST client for PHP.

1.0.0(12y ago)358689.2k↓19.3%120[8 PRs](https://github.com/educoder/pest/pulls)15MITPHPPHP &gt;=5.2

Since Jun 8Pushed 7y ago44 watchersCompare

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

READMEChangelogDependencies (1)Versions (4)Used By (15)

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": {
        "educoder/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.

```
