Skip to main content

Interface: WebResourceCtor<Context>

@divine/web-service.WebResourceCtor

The static side of a web resource.

Specifies how a resource is constructed and configures for what paths the resource applies to.

Type parameters​

NameDescription
ContextThe type of the WebService context.

Constructors​

constructor​

• new WebResourceCtor(context, args)

Constructs a resource instance. Invoked by WebService when a resource's path matches the request path.

Parameters​

NameTypeDescription
contextContextThe WebService context.
argsWebArgumentsThe request arguments.

Defined in​

web-service/src/resource.ts:98

Properties​

path​

• path: RegExp

A regular expression that is used when checking if this filter should process a given request.

Defined in​

web-service/src/resource.ts:89