[Grok-dev] Re: Using POST request

Andreas Jung lists at zopyx.com
Mon Mar 24 07:32:52 EDT 2008



--On 24. März 2008 12:02:21 +0100 Andreas Jung <lists at zopyx.com> wrote:

>
>
> --On 21. März 2008 17:11:47 +0100 Martijn Faassen
> <faassen at startifact.com> wrote:
>
>> Andreas Jung wrote:
>>
>>> --On 21. März 2008 16:51:34 +0100 Martijn Faassen
>>> <faassen at startifact.com> wrote:
>>>
>>>> Okay, so you made the root object (at localhost:8080) be the
>>>> grok.Application object 'eggserver'?
>>>
>>> I have one instance of 'eggserver' instantiated as 'eggs'.
>>> So I want to post against localhost:8080/eggs.
>>
>> Aah, right, I get it now.
>>
>> Note that the alternative pattern would be to use an Index view:
>>
>> class Index(grok.View):
>>     grok.context(eggserver)
>>     def render(self):
>>         if self.request.method == 'POST':
>>              ....
>>
>
> Also this solution does not seem to work. From what I see: a view defined
> this way reacts only to GET requests but not to POST requests..is this
> intentional?!
>

Actually I get intercept a POST request using this approach. But:

 - sending a POST request through 'curl' works
 - POSTing to the same URL using 'python2.4 setup.py sdist upload -r URL'
   still fails with a 404

The transcript recorded using Wireshark is here:

<http://zopyx.com/tmp/sg.txt>

So is there some issue with multipart/form-data?

Andreas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080324/35ce1afe/attachment.bin


More information about the Grok-dev mailing list