Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
corepost
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
nexlab
corepost
Commits
8080f1de
Commit
8080f1de
authored
Sep 02, 2011
by
Jacek Furmankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
5dc9e4cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
README.md
README.md
+13
-6
No files found.
README.md
View file @
8080f1de
...
...
@@ -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
-----------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment