dannote / mod-ndb

Automatically exported from code.google.com/p/mod-ndb
0 stars 0 forks source link

JSONRequest test cases #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Test the various things outline in the JSONRequest proposal, and document (here 
in this issue) what 
things do or do not have test coverage.

Original issue reported on code.google.com by john.david.duncan on 26 Mar 2008 at 3:27

GoogleCodeExporter commented 9 years ago
Here are some requirements from http://www.json.org/JSONRequest.html :

POST:
JSONRequest POST sends a serialized Javascript object or array.
The text may be gzipped. 

GET:
The JSONRequest.get service can only be used to obtain JSON-encoded values. 
JSONRequest.get cannot be 
used to retrieve other text formats.

In general: 
The Content-Type in both directions is application/jsonrequest.
The POST body data will be in JSON format.
The response data will be in JSON format.
The character encoding in both directions will be UTF-8, strictly enforced
If a server wishes to communicate an application-level error, then it should 
return it as a JSON text with an 
HTTP status code of 200 OK.

Original comment by john.david.duncan on 10 Jun 2009 at 4:20