Created: 2008-11-24 22:37
Updated: 2018-07-18 06:06
License: mit

Relax - Easy interaction with RESTful APIs

Relax is a client designed to interact with APIs that conform to the following:

  • Return JSON
  • Respond to GET, PUT AND POST
  • Urls map to the pattern of /collection/123/subcollection/234

Relax also provides a set of Openssl helper classes.


$client = new \Ergo\Http\Client("");

$model = new Relax_Client_Model($client);

// GET queries
$items = $model->transactions(1)->items(); // returns a collection from /transactions/1/items
$address = $model->customers(1)->address(); // returns a resource from /customers/1/address

print $address->streetname; // returns the streetname property from the json doc
print $items->count(); // returns the number of items in the transaction

// PUT queries

// POST queries


Copyright (c) 2012 99designs See LICENSE for details.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more