| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Request
| Instance Methods | |||
|
|||
| a new object with type S, a subtype of T |
|
||
| None |
|
||
|
Inherited from |
|||
| Properties | |
| dict |
cookies Any cookies that was attached to the request. |
| dict |
env HTTP transaction environment. |
| Stream | errors |
| dict |
files Any files uploaded via a POST request. |
| dict |
get Parameters passed in the query string part of the URL. |
| Stream |
input Input stream. |
| bool |
is_active Indicates if the request is active, if we are in the middle of a HTTP transaction |
| dict |
post Parameters passed in the body of a POST request. |
| object |
session Current session. |
| string |
session_id Current session id. |
| URL |
url Reconstructed URL. |
|
Inherited from |
|
| Method Details |
|
|
Log something through errors including process name and id. Normally, errors ends up in the host server error log.
|
| Property Details |
inputInput stream. If you send any data which is neither x-www-form-urlencoded nor multipart format, you will be able to read the raw POST body from this stream. You could read x-www-form-urlencoded or multipart POST requests in raw format, but you have to read from this stream before calling any of post or files, since they will otherwise trigger the built-in parser and read all data from the stream. Example of how to parse a JSON request: import cjson as json import smisk class App(smisk.Application): def service(self): if self.request.env['REQUEST_METHOD'] == 'POST': self.response.write(repr(json.decode(self.request.input.read())) + "\n") App().run() You could then send a request using curl for example: curl --data-binary '{"Url": "http://www.example.com/image/481989943", "Position": [125, "100"]}' http://localhost:8080/
|
sessionCurrent session. Any modifications to the session must be done before output has begun, as it will add a Set-Cookie: header to the response.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun May 11 20:25:44 2008 | http://epydoc.sourceforge.net |