Get information from client without web page
Added by Bruno Zerbo almost 6 years ago
I hope that my question is not trivial but I'm a novice in web developing.
I want to do a web service. I have a client that send some information to my server via http. The client doesn't use web page, actually, by now, I'm not using wt widget I only want to talk between client and server using http. How can I handle, from the server, a POST http request?
thanks in advance,
Bruno
Replies (1)
RE: Get information from client without web page - Added by Wim Dumon almost 6 years ago
Hello Bruno,
A WResource is what you're looking for: it is a Wt class that is linked to a URL, allowing to handle raw HTTP requests.
There are two types of WResource: session-bound WResources and global WResources. Session-bound WResources have random URLs and are tied to an existing Wt session, and are used for session-private communication. You will need global resources, which you can bind to a fixed path by calling WServer.addResource().
Wim.