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

Source

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

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.

Source

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


body?

optional body: unknown

The body that was sent by the user.

Source

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


params

params: Record<string, string> = {}

The URI parameters.

Source

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


query

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

The query parameters.

Source

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