StupidBeauty
Read times:479Posted at:Tue Jan 31 00:49:01 2012
- no title specified

转载:XML and JSON Response

在Wt中要写Web Service,并且返回XML的话,可继承WResource,重载其handleRequest方法,并且使用WServer::addResource将这個WResource子类绑定到一個固定的URL上。

http://redmine.webtoolkit.eu/boards/2/topics/2438

亮点:

Actually, for the non-HTML output, you need to implement resources. If you want these resources to map to 'global' URLs (which I guess is the case for web services), you should deploy them as static resources (WServer::addResource()); if you want to tie them to a session (protected by the session ID), you should add them directly to a WAnchor.

A WApplication only serves a purpose for a normal (HTML/JavaScript/CSS) interactive session.

As an example of an RSS feed which is global, consider the blog example / homepage example, where the RSS feed for the blog is a static resource.

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4