Skip to main content
zerotal

Documentation


Documentation / zerotal / http / ApiContext

Interface: ApiContext

Defined in: packages/core/src/http/negotiate.ts:72

Context passed to the json branch of negotiate().

Stateless — no session, no cookies. Caller is an API client or SPA.

Properties

ctx

readonly ctx: HttpContext

Defined in: packages/core/src/http/negotiate.ts:73

Methods

json()

json(data, status?): void

Defined in: packages/core/src/http/negotiate.ts:74

Parameters

data

unknown

status?

number

Returns

void


bearerToken()

bearerToken(): string | null

Defined in: packages/core/src/http/negotiate.ts:75

Returns

string | null