Commit 8080f1de authored by Jacek Furmankiewicz's avatar Jacek Furmankiewicz

docs

parent 5dc9e4cb
......@@ -12,8 +12,6 @@ Single REST module example
The simplest possible REST application:
::
from corepost.web import CorePost
from corepost.enums import Http
......@@ -43,8 +41,6 @@ The key CorePost object is just an extension of the regular twisted.web Resource
Therefore, it can easily be used to assemble a multi-module REST applications with
different CorePost resources serving from different context paths:
::
from corepost.web import CorePost
from corepost.enums import Http
from twisted.web.resource import Resource
......@@ -113,8 +109,6 @@ The supported types are:
Example:
::
@app.route("/int/<int:intarg>/float/<float:floatarg>/string/<stringarg>",Http.GET)
def test(request,intarg,floatarg,stringarg,**kwargs):
pass
......@@ -131,6 +125,19 @@ If you want a deferred async method, just complete the request yourself, instead
request.write(val)
request.finish()
HTTP codes
------------------
Success:
* 200 (OK) - GET, DELETE, PUT
* 201 (Created_ - POST
Errors:
* 404 - not able to match any URL
* 400 - missing mandatory argument (driven from the arguments on the actual functions)
* 500 - server error
Performance
-----------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment