Skip to content

Latest commit

 

History

History
60 lines (35 loc) · 1.6 KB

CrawleeOneRoute.md

File metadata and controls

60 lines (35 loc) · 1.6 KB

crawlee-one / Exports / CrawleeOneRoute

Interface: CrawleeOneRoute<T, RouterCtx>

Route that a request will be sent to if the request doesn't have a label yet, and if the match function returns truthy value.

If match function returns truthy value, the request is passed to the action function for processing.

NOTE: If multiple records would match the request, then the first record to match a request will process that request.

Type parameters

Name Type
T extends CrawleeOneCtx
RouterCtx extends Record<string, any> = CrawleeOneRouteCtx<T>

Table of contents

Properties

Properties

handler

handler: (ctx: Omit<T["context"] & RouterCtx, "request"> & { request: Request<Dictionary> }) => Awaitable<void>

Type declaration

▸ (ctx): Awaitable<void>

Parameters
Name Type
ctx Omit<T["context"] & RouterCtx, "request"> & { request: Request<Dictionary> }
Returns

Awaitable<void>

Defined in

src/lib/router/types.ts:41


match

match: CrawleeOneRouteMatcher<T, RouterCtx>

Defined in

src/lib/router/types.ts:40