跳到主要内容
版本:Next

Context

Hierarchy

Index

Properties

app

app: IMidwayKoaApplication

cookies

cookies: Cookies

forward

forward: (url: string) => void

logger

logger: ILogger

requestContext

requestContext: IMidwayContainer

Custom properties.

startTime

startTime: number

state

state: State

Methods

getApp

  • getApp(): IMidwayBaseApplication<Context>
  • Get current related application instance.

getAttr

  • getAttr<T>(key: string): T
  • Get value from app attribute map


    Type parameters

    • T

getLogger

  • getLogger(name?: string): ILogger

setAttr

  • setAttr(key: string, value: any): any
  • Set value to app attribute map