[Grok-dev] Re: Using POST request

Andreas Jung lists at zopyx.com
Fri Mar 21 12:05:38 EDT 2008

--On 21. März 2008 16:51:34 +0100 Martijn Faassen <faassen at startifact.com> 

> 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.

> I'm just double-checking as usually
> you install them separately.
> I notice that in my own REST code I manually set the status to 200 using
> a line like:
> self.response.setStatus(200)

Well, I have pdb.set_trace() inside the POST() method and it won't be 
called. The logfile also shows the 404 error..so basically some publisher 
or traversal issue. But I don't know much about the Grok internals at this 
point...just following the REST tutorial from grok.zope.org.

> But this shouldn't be necessary though.
> Can you get GET/PUT/DELETE to work? I.e., is this just a problem with
> POST, or also with the other HTTP methods?

See above. I think there is possibly something missing inside the tutorial
that ties the the grok.REST implementation to the IRESTProtocol or the 
RESTLayer - no idea.

-------------- 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/20080321/a28aedf9/attachment.bin

More information about the Grok-dev mailing list