From ac95cc7ff9efd15b77cee7ee97bec9330f660e49 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Wed, 24 Oct 2012 12:56:52 +0200 Subject: [PATCH] documentation for #265 --- arangod/Documentation/user-manual.dox | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arangod/Documentation/user-manual.dox b/arangod/Documentation/user-manual.dox index 12857a4eda..7835b3b9c1 100644 --- a/arangod/Documentation/user-manual.dox +++ b/arangod/Documentation/user-manual.dox @@ -980,6 +980,22 @@ /// this header itself. ArangoDB might also add a @LIT{Connection} header itself /// to handle HTTP keep-alive. /// +/// ArangoDB also supports automatic transformation of the body data to another +/// format. Currently, the only supported transformations are base64-encoding and +/// base64-decoding. Using the transformations, an action can create a base64 +/// encoded body and still let ArangoDB send the non-encoded version, for example: +/// +/// @code +/// res.body = 'VGhpcyBpcyBhIHRlc3Q='; +/// res.transformations = res.transformations || [ ]; // initialise +/// res.transformations.push('base64decode'); // will base64 decode the response body +/// @endcode +/// +/// When ArangoDB processes the response, it will base64-decode what's in @LIT{res.body} +/// and set the HTTP header @LIT{Content-Encoding: binary}. The opposite can be +/// achieved with the @LIT{base64encode} transformation: ArangoDB will then automatically +/// base64-encode the body and set a @LIT{Content-Encoding: base64} HTTP header. +/// /// @section UserManualActionsHandlers Writing dynamic action handlers ///////////////////////////////////////////////////////////////////// ///