Interface: RouteOptions
Extends
Options
Properties
acceptedContentMimeTypes?
optional
acceptedContentMimeTypes:null
| readonlyMimeType
[]
The accepted content types for this route. If set to null, the route will accept any data.
Since
1.3.0
Default Value
this.context.server.options.acceptedContentMimeTypes ?? null
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:127
maximumBodyLength?
optional
maximumBodyLength:number
(RFC 7230 3.3.2) The maximum decimal number of octets.
Since
1.0.0
Default Value
this.context.server.options.maximumBodyLength ?? 1024 * 1024 * 50
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:119
methods?
optional
methods: readonly ("ACL"
|"BIND"
|"CHECKOUT"
|"CONNECT"
|"COPY"
|"DELETE"
|"GET"
|"HEAD"
|"LINK"
|"LOCK"
|"M-SEARCH"
|"MERGE"
|"MKACTIVITY"
|"MKCALENDAR"
|"MKCOL"
|"MOVE"
|"NOTIFY"
|"OPTIONS"
|"PATCH"
|"POST"
|"PROPFIND"
|"PROPPATCH"
|"PURGE"
|"PUT"
|"REBIND"
|"REPORT"
|"SEARCH"
|"SOURCE"
|"SUBSCRIBE"
|"TRACE"
|"UNBIND"
|"UNLINK"
|"UNLOCK"
|"UNSUBSCRIBE"
)[]
The methods this route accepts.
Since
7.0.0
Default Value
The method defined in the piece name, or none if not set.
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:135
route?
optional
route:string
The route the piece should represent.
Since
1.0.0
Default Value
The filesystem-based path, or the name if the location is virtual.
Examples
'/users'
// request.params -> {}
'/guilds/[guild]/members/[member]'
// request.params -> { guild: '...', member: '...' }
Defined in
projects/plugins/packages/api/src/lib/structures/Route.ts:111