Poco::OSP::Web::WebServerDispatcher

struct VirtualPath

File Information

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

Description

A VirtualPath struct is used to specify a path mapping for a bundle.

Constructors

VirtualPath inline

VirtualPath();

VirtualPath inline

VirtualPath(
    const std::string & aPath,
    const std::string & aResource,
    const PathSecurity & aSecurity,
    Bundle::ConstPtr pOwner
);

VirtualPath inline

VirtualPath(
    const std::string & aPath,
    RequestHandlerFactoryPtr aFactory,
    const PathSecurity & aSecurity,
    Bundle::ConstPtr pOwner
);

Variables

cache

bool cache;

resource can be cached

cors

PathCORS cors;

CORS settings

description

std::string description;

user-readable description of resource or service

exactMatch

bool exactMatch;

request path must match exactly

hidden

bool hidden;

path is not included in list returned by listVirtualPaths()

indexPage

std::string indexPage;

index page (only used if resource path is set; defaults to "index.html")

methods

std::set < std::string > methods;

allowed methods ("GET", "POST", etc.)

pFactory

RequestHandlerFactoryPtr pFactory;

request handler factory (null if resource path is specified)

pOwnerBundle

Bundle::Ptr pOwnerBundle;

bundle owning path

pPattern

RegularExpressionPtr pPattern;

pattern for matching request handlers

path

std::string path;

virtual server path (e.g., /images)

redirectOn401

std::string redirectOn401;

redirect (302) on a 401 error if request is a GET

resource

std::string resource;

resource path (if mapped to resource)

responseFormat

ResponseFormat responseFormat;

error response format (HTML or JSON)

security

PathSecurity security;

security attributes

Securely control IoT edge devices from anywhere   Connect a Device