IQContext
@quik/http / IQContext
Interface: IQContext<TUser>
Defined in: http/src/router/endpoint/QContext.ts:10
Type Parameters
TUser
Properties
authorization
readonlyauthorization:IQAuthorizationInformation
Defined in: http/src/router/endpoint/QContext.ts:19
body
readonlybody:ObjectLiteral
Defined in: http/src/router/endpoint/QContext.ts:15
files
readonlyfiles:Record<string,ObjectLiteral[]>
Defined in: http/src/router/endpoint/QContext.ts:16
headers
readonlyheaders:Record<string,string>
Defined in: http/src/router/endpoint/QContext.ts:12
ip?
readonlyoptionalip?:string
Defined in: http/src/router/endpoint/QContext.ts:25
language
readonlylanguage:string
Defined in: http/src/router/endpoint/QContext.ts:23
method
readonlymethod:string
Defined in: http/src/router/endpoint/QContext.ts:11
page
readonlypage:string
Defined in: http/src/router/endpoint/QContext.ts:18
path
readonlypath:Record<string,string>
Defined in: http/src/router/endpoint/QContext.ts:17
query
readonlyquery:Record<string,string|string[]>
Defined in: http/src/router/endpoint/QContext.ts:14
requestId
readonlyrequestId:string
Defined in: http/src/router/endpoint/QContext.ts:13
scheme
readonlyscheme:string
Defined in: http/src/router/endpoint/QContext.ts:22
token
readonlytoken:string
Defined in: http/src/router/endpoint/QContext.ts:21
user
readonlyuser:TUser
Defined in: http/src/router/endpoint/QContext.ts:20
userAgent?
readonlyoptionaluserAgent?: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?
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?
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