Skip to main content

Class: WebResourceBase<Context>

@divine/web-service.WebResourceBase

An optional, trivial base class for resources, which simply stores a reference to the context and request arguments.

Type parameters

NameDescription
ContextThe type of the WebService context.

Implements

Constructors

constructor

new WebResourceBase<Context>(_context, _args)

Constructs a resource or filter instance.

Type parameters

Name
Context

Parameters

NameTypeDescription
_contextContextThe WebService context.
_argsWebArgumentsThe request arguments.

Defined in

web-service/src/resource.ts:224

Properties

_args

Protected _args: WebArguments

The request arguments.

Defined in

web-service/src/resource.ts:224


_context

Protected _context: Context

The WebService context.

Defined in

web-service/src/resource.ts:224

Methods

close

close(): Promise<void>

Invoked when the request has been fully processed. Useful for clean-up tasks.

Returns

Promise<void>

Implementation of

WebResource.close

Defined in

web-service/src/resource.ts:228