Skip to main content

Interface: RouteOptions

Extends​

  • Options

Properties​

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:112


methods?​

optional methods: readonly ("GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH" | "ACL" | "BIND" | "CHECKOUT" | "COPY" | "LINK" | "LOCK" | "M-SEARCH" | "MERGE" | "MKACTIVITY" | "MKCALENDAR" | "MKCOL" | "MOVE" | "NOTIFY" | "PROPFIND" | "PROPPATCH" | "PURGE" | "QUERY" | "REBIND" | "REPORT" | "SEARCH" | "SOURCE" | "SUBSCRIBE" | "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:120


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:104