I figured out my problem.  I needed to set the content-type header on my
client.  At that point, request.body had the JSON in clear text (I was
getting urlencoded text).

Is there anything wrong with using request.body?  Thanks for the reply!

-stephan

On Mon, May 31, 2010 at 1:40 AM, Alexandre Bourget <[email protected]> wrote:

> Use
>
> data = json.load(request.environ['wsgi.input'])
>
> to load the content, Pylons' side
>
> Alexandre
>
> On Sun, May 30, 2010 at 8:38 PM, Stephan Ellis <[email protected]>wrote:
>
>> Hello All,
>>
>>   Can anyone jot down a very simple example of sending a snippet of JSON
>> with urllib2 to a pylons app.  I am not sure where my problem is, pylons or
>> my script that sends the JSON snippet.
>>
>> Thanks!
>>
>> -stephan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<pylons-discuss%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/pylons-discuss?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<pylons-discuss%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to