How to use the midway-core.MidwayRequestContainer function in midway-core

To help you get started, we’ve selected a few midway-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github midwayjs / midway / packages / midway-web / app / extend / context.js View on Github external
get requestContext() {
    if (!this[rc]) {
      this[rc] = new MidwayRequestContainer(this.app.applicationContext, this);
      this[rc].ready();
    }
    return this[rc];
  },
};
github midwayjs / midway-faas / packages / faas / src / starter.ts View on Github external
getContext(context) {
    if (!context.requestContext) {
      context.requestContext = new MidwayRequestContainer(
        this.loader.getApplicationContext(),
        context
      );
    }
    return context;
  }
}