Skip to main content

Class: ApiRequest

api/src.ApiRequest

Hierarchy

  • IncomingMessage

    ApiRequest

Constructors

constructor

new ApiRequest(socket)

Parameters

NameType
socketSocket

Inherited from

IncomingMessage.constructor

Defined in

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

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


body

Optional body: unknown

The body that was sent by the user.

Defined in

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


params

params: Record<string, string> = {}

The URI parameters.

Defined in

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


query

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

The query parameters.

Defined in

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