[Grok-dev] Re: Using POST request

Martijn Faassen faassen at startifact.com
Fri Mar 21 11:51:34 EDT 2008


Hey,

Andreas Jung wrote:
> --On 21. März 2008 16:14:53 +0100 Martijn Faassen 
> <faassen at startifact.com> wrote:
>> Andreas Jung wrote:
>> [snip]
>>> python2.4 setup.py sdist upload -r
>>> http://localhost:8080/++rest++upload/eggs
>>
>> Doesn't this need to be:
>>
>> http://localhost:8080/myapp/++rest++upload/eggs?
> 
> There is basically only the application (which is also a model).
> So basically I want to post against the application object because
> are no further content objects.

Okay, so you made the root object (at localhost:8080) be the 
grok.Application object 'eggserver'? 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)

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?

Regards,

Martijn



More information about the Grok-dev mailing list