Hey Maurice, 2010/3/3 Koen Deforche <[email protected]>: > 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).
I've implemented this now and so expect this in public git sometime next week. > 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. I've implemented this as well. Note that there will still be a session appended to the path. Regards, koen ------------------------------------------------------------------------------ Download Intel® 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
