Skip to main content

IQContext

@quik/http


@quik/http / IQContext

Interface: IQContext<TUser>

Defined in: http/src/router/endpoint/QContext.ts:10

Type Parameters

TUser

TUser extends IQUser = IQUser

Properties

authorization

readonly authorization: IQAuthorizationInformation

Defined in: http/src/router/endpoint/QContext.ts:19


body

readonly body: ObjectLiteral

Defined in: http/src/router/endpoint/QContext.ts:15


files

readonly files: Record<string, ObjectLiteral[]>

Defined in: http/src/router/endpoint/QContext.ts:16


headers

readonly headers: Record<string, string>

Defined in: http/src/router/endpoint/QContext.ts:12


ip?

readonly optional ip?: string

Defined in: http/src/router/endpoint/QContext.ts:25


language

readonly language: string

Defined in: http/src/router/endpoint/QContext.ts:23


method

readonly method: string

Defined in: http/src/router/endpoint/QContext.ts:11


page

readonly page: string

Defined in: http/src/router/endpoint/QContext.ts:18


path

readonly path: Record<string, string>

Defined in: http/src/router/endpoint/QContext.ts:17


query

readonly query: Record<string, string | string[]>

Defined in: http/src/router/endpoint/QContext.ts:14


requestId

readonly requestId: string

Defined in: http/src/router/endpoint/QContext.ts:13


scheme

readonly scheme: string

Defined in: http/src/router/endpoint/QContext.ts:22


token

readonly token: string

Defined in: http/src/router/endpoint/QContext.ts:21


user

readonly user: TUser

Defined in: http/src/router/endpoint/QContext.ts:20


userAgent?

readonly optional userAgent?: string

Defined in: http/src/router/endpoint/QContext.ts:24

Methods

clearCookie()

clearCookie(cookieName, options?): void

Defined in: http/src/router/endpoint/QContext.ts:57

Remove a cookie from the current response.

Parameters

cookieName

string

Cookie name to remove

options?

IQCookieOptions

Cookie options applied by the HTTP adapter

Returns

void


getCookie()

getCookie(cookieName): string

Defined in: http/src/router/endpoint/QContext.ts:40

Read a cookie value from the current request.

Parameters

cookieName

string

Cookie name to read

Returns

string


getObject()

getObject<T>(key): T

Defined in: http/src/router/endpoint/QContext.ts:29

Type Parameters

T

T = any

Parameters

key

string

Returns

T


logout()

logout(): void

Defined in: http/src/router/endpoint/QContext.ts:27

Returns

void


setCookie()

setCookie(cookieName, cookieValue, options?): void

Defined in: http/src/router/endpoint/QContext.ts:49

Add a cookie to the current response.

Parameters

cookieName

string

Cookie name to write

cookieValue

string

Cookie value to write

options?

IQCookieOptions

Cookie options applied by the HTTP adapter

Returns

void


setObject()

setObject<T>(key, object): void

Defined in: http/src/router/endpoint/QContext.ts:31

Type Parameters

T

T = any

Parameters

key

string

object

T

Returns

void


translate()

translate(key, parameters?): string

Defined in: http/src/router/endpoint/QContext.ts:33

Parameters

key

string

parameters?

ObjectLiteral

Returns

string