Project

General

Profile

Sending and receiving http requests

Added by Shayan Javani almost 9 years ago

How can I make a simple server whose only job is to handle get requests. I don't want any UI or anything, just a server that is up, receives get(or maybe post) requests with some parameters, does some computation and sends the result back to the client when the computation is done via server push. How can that be done?

Thanks


Replies (1)

RE: Sending and receiving http requests - Added by Wim Dumon almost 9 years ago

With WResource.

Use them as global resources (i.e. attached to a fixed path, instead of being related to a session), by calling WServer::addResource().

WResources can be used in a fully asynchronous way, so what you describe is perfectly possible with Wt's continuations in handleRequest().

Best regards,

Wim.

    (1-1/1)