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
e1b101be
Commit
e1b101be
authored
Sep 29, 2011
by
Jacek Furmankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
27524c6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
README.md
README.md
+4
-7
No files found.
README.md
View file @
e1b101be
...
...
@@ -159,8 +159,7 @@ Content types
CorePost integrates support for JSON, YAML and XML (partially) based on request content types.
Parsing of incoming content
^^^^^^^^^^^^^^^^^^^^^^^^^^^
*Parsing of incoming content*
Based on the incoming content type in POST/PUT requests,
the body will be automatically parsed to JSON, YAML and XML (ElementTree) and attached to the request:
...
...
@@ -182,8 +181,7 @@ the body will be automatically parsed to JSON, YAML and XML (ElementTree) and at
return "%s" % yaml.dump(request.yaml)
Routing requests by incoming content type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*Routing requests by incoming content type*
Based on the incoming content type in POST/PUT requests,
the
*same*
URL can be hooked up to different router methods:
...
...
@@ -204,8 +202,7 @@ the *same* URL can be hooked up to different router methods:
def test_content_catch_all(self,request,**kwargs):
return MediaType.WILDCARD
Converting Python objects to content type based on what caller can accept
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*Converting Python objects to content type based on what caller can accept*
Instead of returning string responses, the code can just return Python objects.
Depending whether the caller can accept JSON (default) or YAML, the Python objects
...
...
@@ -259,4 +256,4 @@ Plans
-----
*
match all the relevant features of the Flask API
*
integrate twisted.internet.processes in order to scale to multiple CPU cores : http://pypi.python.org/pypi/twisted.internet.processes
\ No newline at end of file
*
integrate twisted.internet.processes in order to scale to multiple CPU cores : http://pypi.python.org/pypi/twisted.internet.processes
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