Class: abstract Route<Options>
Since
1.0.0
Extends
Piece<Options,"routes">
Type parameters
| Type parameter | Value |
|---|---|
Options extends Options | Options |
Constructors
new Route()
new Route<
Options>(context:LoaderContext,options:Options):Route<Options>
Parameters
| Parameter | Type |
|---|---|
context | LoaderContext |
options | Options |
Returns
Route<Options>
Overrides
Piece<Options, 'routes'>.constructor
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:33
Properties
acceptedContentMimeTypes
readonlyacceptedContentMimeTypes:null| readonly (`message/${string}` | `audio/${string}` | `video/${string}` | `image/${string}` | `text/${string}` | `application/${string}` | `multipart/${string}` | `X-${string}/${string}`)[]
The accepted content types.
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:21
maximumBodyLength
readonlymaximumBodyLength:number
(RFC 7230 3.3.2) The maximum decimal number of octets.
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:16
methods
readonlymethods:Collection<Methods,MethodCallback>
The methods this route accepts.
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:31
router
readonlyrouter:RouteData
The route information.
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:26
Methods
onLoad()
onLoad():
unknown
Per-piece listener that is called when the piece is loaded into the store. Useful to set-up asynchronous initialization tasks.
Returns
unknown
Overrides
Piece.onLoad
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:52
onUnload()
onUnload():
unknown
Per-piece listener that is called when the piece is unloaded from the store. Useful to set-up clean-up tasks.
Returns
unknown
Overrides
Piece.onUnload
Source
projects/plugins/packages/api/src/lib/structures/Route.ts:66