Skip to main content
Version: v1

@fluidframework/request-handler Package

Classes

ClassDescription
RuntimeRequestHandlerBuilderThe RuntimeRequestHandlerBuilder creates a runtime request handler based on request handlers. The provided handlers sequentially applied until one is able to satisfy the request.

Types

TypeAliasDescription
RuntimeRequestHandlerA request handler for the container runtime. Each handler should handle a specific request, and return undefined if it does not apply. These handlers are called in series, so there may be other handlers before or after. A handler should only return error if the request is for a route the handler owns, and there is a problem with the route, or fulling the specific request.

Functions

FunctionReturn TypeDescription
buildRuntimeRequestHandler(handlers)(request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>
handleFromLegacyUri(uri, runtime)IFluidHandle<T>

Variables

VariableTypeDescription
createFluidObjectResponse(fluidObject: FluidObject) => { status: 200; mimeType: "fluid/object"; value: FluidObject; }
rootDataStoreRequestHandler(request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>A request handler to expose access to all root data stores in the container by id.

Function Details

buildRuntimeRequestHandler

Signature

export declare function buildRuntimeRequestHandler(...handlers: RuntimeRequestHandler[]): (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;

Parameters

ParameterTypeDescription
handlersRuntimeRequestHandler[]

Returns

Return type: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>

handleFromLegacyUri

Signature

export declare function handleFromLegacyUri<T = FluidObject & IFluidLoadable>(uri: string, runtime: IContainerRuntimeBase): IFluidHandle<T>;
Type Parameters
ParameterDefaultDescription
TFluidObject & IFluidLoadable

Parameters

ParameterTypeDescription
uristring
runtimeIContainerRuntimeBase

Returns

Return type: IFluidHandle<T>

Variable Details

createFluidObjectResponse

Signature

createFluidObjectResponse: (fluidObject: FluidObject) => {
status: 200;
mimeType: "fluid/object";
value: FluidObject;
}

Type: (fluidObject: FluidObject) => { status: 200; mimeType: "fluid/object"; value: FluidObject; }

rootDataStoreRequestHandler

A request handler to expose access to all root data stores in the container by id.

Signature

rootDataStoreRequestHandler: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>

Type: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>