Poco::OSP::Web

class WebFilter

File Information

Library: OSP/Web
Package: Web
Header: Poco/OSP/Web/WebFilter.h

Description

A WebFilter is used to process a bundle resource before it is sent to the client. This can be used, e.g., to implement web pages containing server-side scripts.

Member Summary

Member Functions: process

Types Aliases

Args

using Args = std::map < std::string, std::string >;

Arguments for the WebFilter instance (from extension point).

Destructor

~WebFilter virtual

virtual ~WebFilter();

Destroys the WebFilter.

Member Functions

process virtual

virtual void process(
    Poco::Net::HTTPServerRequest & request,
    Poco::Net::HTTPServerResponse & response,
    const std::string & path,
    std::istream & resourceStream,
    Poco::OSP::Bundle::ConstPtr pBundle
) = 0;

Processes the given resourceStream and sends it as HTTP response for the given request.

The content-type of the response will initially be set to the content-type of the resource, but can be changed by the method.