Re: [Twisted-Python] Asynchronously reading posted data

2013-09-05 Thread Paul Wiseman
Ah awesome that clears it up, thanks! I've never had to deal with HTTP requests with content bodies before. I presumed that the .read() would be pulling bytes from the network. I presumed wrong :) Thanks! Paul On 5 September 2013 12:24, wrote: > On 08:50 am, poal...@gmail.com wrote: > >> Hey

Re: [Twisted-Python] Asynchronously reading posted data

2013-09-05 Thread exarkun
On 08:50 am, poal...@gmail.com wrote: Hey, Thanks for your reply! The json data should never be too long so I'm not worried about the memory usage, I need the whole json object to start working anyway realistically - I was more concerned about blocking reading the data from the network - spec

Re: [Twisted-Python] Asynchronously reading posted data

2013-09-05 Thread Paul Wiseman
Hey, Thanks for your reply! The json data should never be too long so I'm not worried about the memory usage, I need the whole json object to start working anyway realistically - I was more concerned about blocking reading the data from the network - specifically the request.content.read(), if the

Re: [Twisted-Python] Asynchronously reading posted data

2013-09-04 Thread Glyph
On Sep 4, 2013, at 10:48 AM, Paul Wiseman wrote: > I'm still pretty new to twisted and feel I'm slowly getting the hang of it, > enough to realise that this line of code is probably going to block and not > do me any favours, the line is the first line in a resource.Resource > render_POST. >

[Twisted-Python] Asynchronously reading posted data

2013-09-04 Thread Paul Wiseman
I'm still pretty new to twisted and feel I'm slowly getting the hang of it, enough to realise that this line of code is probably going to block and not do me any favours, the line is the first line in a resource.Resource render_POST. json_request = json.loads(request.content.read()) The resource.