@ash-framework/http-context
Wrapper for express request and response with request wide state storage and retrieval
Install
- Install:
npm install --save @ash-framework/http-context
- Module:
require('@ash-framework/http-context')
Usage
Creating an instance of HttpContext
const context = new HttpContext(request, response)
Accessing request and response on context
context.request
context.response
Using context to store state for the lifetime of the request
context.set('token', 'AGH123AS34SDF')
Retrieving stored state anywhere request
is available
const anotherContext = new HttpContext(request, response)
anotherContext.get('token) // 'AGH123AS34SDF'
History
Discover the release history by heading on over to the releases page.
Backers
Maintainers
These amazing people are maintaining this project:
- Richard Walker digitalsadhu@gmail.com
Sponsors
These amazing people have contributed finances to this project:
Become a sponsor!
Contributors
These amazing people have contributed code to this project:
License
Unless stated otherwise all works are:
- Copyright © Richard Walker
and licensed under: