WikklyText A wikitext server and rendering library


files/feed-icon-14x14.png Recently Edited Valid XHTML 1.0 Strict
API.TiddlyWeb.MediaTypes edit
frank, 21 June 2008 (created 16 June 2008)
Tags: -rss
DRAFT
This information is preliminary and not yet (or only partially) implemented. Do not rely on any information presented here until this notice is removed.


When you GET a resource from a TiddlyWeb server, you must tell the server what data format you would like to receive. There are two ways to do this:
  • Specifying a format extension
  • Setting an HTTP header

Select by format extension


To select type by format extension, make a request of the form:
GET API_ROOT/RESOURCE.format


Where format is as defined below.

formatMIME type requestedMIME type returned
txt text/plain text/plain
html text/html text/html
json application/json application/json
wiki text/x-tiddlywiki text/html

Select by Accept header


Instead of adding the .format extension, you can set the HTTP Accept header to one of the MIME types from the above table. In this case, your request is simply:
GET API_ROOT/RESOURCE


Ambiguous Requests


If both .format and an Accept header are given, the .format takes precedence, assuming it is valid.