Hey Maurice,

2010/3/3 Maurice Gittens <[email protected]>:
> Hi,
>
> I'd like to use the Witty Application Server to serve not only a Witty
> Application
> but also to serve JSON data as a restful data service.
>
> Consequently I will need to handle HTTP POST, DELETE and PUT methods
> in the My Wt application server.
>
> I would like to allow users logged in via a valid Wt session access to my
> Restful Json data stores.
> What is the recommended way to do this with Wt?

Currently, you can already GET and POST to a WResource. Providing
support for DELETE and PUT is a logical extension. You can also
already access the raw input stream (that was POST'ed or PUT) when it
is not something that can be parsed by the CGI Parser from
Http::Request::in().

The missing parts are:
 - provide support for DELETE and PUT commands in the httpd and check
that it works for the fastcgi connector.
 - expose information on the command in Http::Request (GET, POST,
DELETE or PUT).

Currently a WResource will have a random (auto-generated) URL. You
probably want a predictable URL for your service, and this would also
require a small extension to WResource (setInternalPath()) together
with support in our web controller.

> Or should I simply implement my own data-server without using Wt?

I think it makes alot of sense to enable WResource to have this functionality!

Regards,
koen

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to