Skip to content
mohsinhijazee edited this page Sep 13, 2010 · 15 revisions

rest_plugin

rest_plugin makes possible to access Dedomenon databases via REST API.

HTTP Notes

This section contains notes regarding HTTP protocol. Note that these are my personal notes and rest_plugin might differ from what I’m writing here. So do not assume that REST plugin would be behaving exactly as the HTTP specifications are like supporting all the request methods. Though the goal is to be 100% HTTP compliant which is the philosophy of REST at the very outset.

HTTP is a request and response protocol between a server and a user agent.

Request Message

consists of following:

  • Request line: GET /images/logo.gif HTTP/1.1
  • Headers such as Accept-Language: en
  • An empty line
  • An optional message body.

Request Methods

Following request methods are available:

  • HEAD: Ask for response identical to a GET request but without the message body. This is useful for getting meta-information written in response headers.
  • GET: Get the representation of the specified resource.
  • POST: Submit data to be processed. The data is included in the body of the request.
  • PUT: Uploads representation of the specified resource.
  • DELETE: Delete the specified resource
  • TRACE: Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request.
  • OPTIONS: Returns the HTTP methods that the server supports for the specified URL. This can be used to check functionality of a web server by requesting instead of a specific resource.
  • CONNECT: Converts the request connection to a transport TCP/IP tunnel, usually to facilitate SSL-encrypted communication through an unencrypted HTTP proxy.

REST Auth Notes

REST Auth can be done in two ways.

  • One is replicating some existing custom scheme or developing one of our own.
  • Trying to incorporate HTTP Authentication.

I would go for the second because REST emphasizes to leverage existing infrastructure

HTTP Authentication

Architecture

Installation