Skip to main content

Class: ApiRequest

Extends

  • IncomingMessage

Constructors

new ApiRequest()

new ApiRequest(socket: Socket): ApiRequest

Parameters

ParameterType
socketSocket

Returns

ApiRequest

Inherited from

IncomingMessage.constructor

Defined in

node_modules/@types/node/http.d.ts:1136

Properties

auth?

optional auth: null | AuthData

The authorization information. This field indicates three possible values:

  • undefined: The authorization middleware has not been executed yet.
  • null: The user is not authorized.
  • AuthData: The user is authorized.

Defined in

projects/plugins/packages/api/src/lib/structures/api/ApiRequest.ts:29


body?

optional body: unknown

The body that was sent by the user.

Defined in

projects/plugins/packages/api/src/lib/structures/api/ApiRequest.ts:20


params

params: Record<string, string> = {}

The URI parameters.

Defined in

projects/plugins/packages/api/src/lib/structures/api/ApiRequest.ts:15


query

query: Record<string, string | string[]> = {}

The query parameters.

Defined in

projects/plugins/packages/api/src/lib/structures/api/ApiRequest.ts:10


route?

optional route: null | Route<RouteOptions>

The route that matched the request. The field indicates three possible values:

  • undefined: The router handler has not been executed yet.
  • null: The router handler has been executed, but no route matched the request.
  • Route: The router handler has been executed and a route matched the request.

Since

7.0.0

Defined in

projects/plugins/packages/api/src/lib/structures/api/ApiRequest.ts:57


routerNode?

optional routerNode: null | RouterNode

The router node that matched the request. The field indicates three possible values:

  • undefined: The router handler has not been executed yet.
  • null: The router handler has been executed, but no node matched the request.
  • RouterNode: The router handler has been executed and a node matched the request.

Since

7.0.0

Defined in

projects/plugins/packages/api/src/lib/structures/api/ApiRequest.ts:43