class Poco::Net::HTTPRequestHandler

Overview

The abstract base class for HTTPRequestHandlers created by HTTPServer. Moreā€¦

#include <HTTPRequestHandler.h>

class HTTPRequestHandler
{
public:
    // methods

    virtual
    void
    handleRequest(
        HTTPServerRequest& request,
        HTTPServerResponse& response
        ) = 0;
};

// direct descendants

class AbstractHTTPRequestHandler;

Detailed Documentation

The abstract base class for HTTPRequestHandlers created by HTTPServer.

Derived classes must override the handleRequest() method. Furthermore, a HTTPRequestHandlerFactory must be provided.

The handleRequest() method must perform the complete handling of the HTTP request connection. As soon as the handleRequest() method returns, the request handler object is destroyed.

A new HTTPRequestHandler object will be created for each new HTTP request that is received by the HTTPServer.

Construction

virtual
~HTTPRequestHandler()

Destroys the HTTPRequestHandler.

Methods

virtual
void
handleRequest(
    HTTPServerRequest& request,
    HTTPServerResponse& response
    ) = 0

Must be overridden by subclasses.

Handles the given request.