On Tue, 2009-06-30 at 21:56 +0800, Vincent Gulinao wrote:
> In my case at least it's cStringIO, and getvalue() sufficed.
>
> Sorry, subscribing to twisted-web now.
>
> Thanks everyone.
One last followup, for those not on twisted-web: DO NOT use getvalue().
The promised interface is file-like. An
In my case at least it's cStringIO, and getvalue() sufficed.
Sorry, subscribing to twisted-web now.
Thanks everyone.
On Tue, Jun 30, 2009 at 8:41 PM, Jean-Paul Calderone wrote:
> On Tue, 30 Jun 2009 13:12:05 +0100, Reza Lotun wrote:
>>Hi,
>>
>>On Tue, Jun 30, 2009 at 12:56 PM, Tristan
>>Seligma
On Tue, 30 Jun 2009 13:12:05 +0100, Reza Lotun wrote:
>Hi,
>
>On Tue, Jun 30, 2009 at 12:56 PM, Tristan
>Seligmann wrote:
>>> To be safer, I do a request.content.getvalue() since content is a
>>> cStringIO object and you can never be sure if somewhere along the
>>> chain of processing someone hasn
Hi,
On Tue, Jun 30, 2009 at 12:56 PM, Tristan
Seligmann wrote:
>> To be safer, I do a request.content.getvalue() since content is a
>> cStringIO object and you can never be sure if somewhere along the
>> chain of processing someone hasn't done a .read and forgot to do a
>> .seek(0,0).
>
> You shou
On Tue, Jun 30, 2009 at 10:44 AM, Reza Lotun wrote:
> To be safer, I do a request.content.getvalue() since content is a
> cStringIO object and you can never be sure if somewhere along the
> chain of processing someone hasn't done a .read and forgot to do a
> .seek(0,0).
You should probably do the
Hi,
On Tue, Jun 30, 2009 at 9:18 AM, Phil Mayers wrote:
> request.content.read()
To be safer, I do a request.content.getvalue() since content is a
cStringIO object and you can never be sure if somewhere along the
chain of processing someone hasn't done a .read and forgot to do a
.seek(0,0).
Chee
works :)
On Tue, Jun 30, 2009 at 4:18 PM, Phil Mayers wrote:
> On Tue, Jun 30, 2009 at 09:07:57AM +0100, Vincent Gulinao wrote:
>>How do you read JSON content from a POST using http.Request. I peeked
>>on args and it's empty.
>
> "args" is www-urlencoded only. If the content-type is something else
On Tue, Jun 30, 2009 at 09:07:57AM +0100, Vincent Gulinao wrote:
>How do you read JSON content from a POST using http.Request. I peeked
>on args and it's empty.
"args" is www-urlencoded only. If the content-type is something else
it's not filled in.
You want:
request.content.read()
IIRC
_
How do you read JSON content from a POST using http.Request. I peeked
on args and it's empty.
TIA.
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python