REST Protocol

The REST Protocol offers an exchange-oriented implementation of HTTP. Unlike Rebol’s built-in HTTP Protocol, REST gives you greater access to both Request and Response headers in order to better access third-party APIs. Additionally, REST has OAuth signing built-in for all those hard-to-reach sites.

Requests

Making requests is easy, just use ‘read.

read [ scheme: 'rest url: http://rebol.info/]

Using OAuth is as straightforward as adding the various keys and secrets:

Notes

This version of the REST Protocol does not use Rebol’s built-in TCP Ports, rather uses the cURL shell command. cURL is available by default on most Unix/Linux/Mac OS X installations, and is generally available for most platforms. cURL is used to allow HTTPS support from the Rebol/Core interpreter.

This should work within most Shell environments, I have tested on CSH, BASH and SH.

A version of this script that uses Rebol’s internal TCP protocol is available at:REST; though has some caveats.

Please direct any questions/suggestions for now to my Twitter account: @rgrebol