跳到主要内容
版本:Next

Context <ResponseBodyT>

@deprecated

since version 3.0.0 Please use Context from ‘@midwayjs/web’

Hierarchy

Index

Properties

forward

forward: (url: string) => void

requestContext

requestContext: IMidwayContainer

Custom properties.

session

session: { length: number; maxAge: number | session; populated: boolean; manuallyCommit: any; save: any; toJSON: any }

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

setAttr

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