Skip to main content

Interface: RouteOptions

@sapphire/plugin-api.RouteOptions

Hierarchy

  • Options

    RouteOptions

Properties

acceptedContentMimeTypes

Optional acceptedContentMimeTypes: null | (`text/${string}` | `multipart/${string}` | `message/${string}` | `image/${string}` | `audio/${string}` | `video/${string}` | `application/${string}` | `X-${string}/${string}`)[]

The accepted content types for this route. If set to null, the route will accept any data.

since 1.3.0

default this.context.server.options.acceptedContentMimeTypes ?? null

Defined in

projects/plugins/packages/api/src/lib/structures/Route.ts:107


maximumBodyLength

Optional maximumBodyLength: number

(RFC 7230 3.3.2) The maximum decimal number of octets.

since 1.0.0

default this.context.server.options.maximumBodyLength ?? 1024 1024 50

Defined in

projects/plugins/packages/api/src/lib/structures/Route.ts:100


route

Optional route: string

The route the piece should represent.

since 1.0.0

default ''

example

'/users'
// request.params -> {}

example

'/guilds/:guild/members/:member/'
// request.params -> { guild: '...', member: '...' }

Defined in

projects/plugins/packages/api/src/lib/structures/Route.ts:93