There are several types of requests you can send to a HTTP server. The most common ones are the following.
You can add handlers for each of these methods to a HTTP server object. Each handler is usually responsible for a master resource. You can think of a master resource as some sort of directory. Each master resource contains one or more subresources which are similar to files.
class RpcInfoHandler : public HtmlFormHandler { RpcInfoHandler() : HtmlFormHandler("/rpc-info/"){ addSubResource("", this, &RpcInfoHandler::handle_index);
addSubResource("index.html", this, &RpcInfoHandler::handle_index); } CppString handle_index(const HtmlFormData &formdata, CppString &mimetype) { mimetype = "text/html";
return data_for_index;
} }; ... http_server.addHttpHandler("get",
make_methodhandler(rpcinfo, &RpcInfoHandler::handler));