Restfully

Restfully is a general-purpose client library for RESTful APIs. It is written in Ruby. Its goal is to abstract the nitty-gritty details of exchanging HTTP requests between the user-agent and the server. It also discovers resources at runtime, which means should the API change and add a new functionality, the client will automatically discover it.

APIs provided

None

APIs used

None

Message queue use

Nothing is written to and read from the message queue.

Assumptions

None

Implementation details

It works on simple concepts:

All APIs are made of resources, and collections of resources. The media-type of a resource dictates the relationships between that resource and the other resources, and what it is possible to do with them. Therefore, Restfully can work with any reasonably RESTful API provided that:

The API returns semantically correct HTTP status codes; The API make use of GET, POST, PUT, DELETE HTTP methods; The API returns a valid Content-Type header in all responses; The API returns a Location HTTP header on 201 and 202 responses; The API returns links to other resources in all responses (the so-called HATEOAS constraint of REST). If one of the API Content-Type is not already supported by one of the Restfully::MediaType objects (see lib/restfully/media_type), then you just have to build it and register it with Restfully.

Restfully is a third-party tool and so may evolve independently from the BonFIRE projet. The latest version of this tool and its documentation can be found here: https://github.com/crohr/restfully

Table Of Contents

Previous topic

EDM Prov

Next topic

Command Line Tools

This Page