@ash-framework/http-context
v1.0.0
Published
Wrapper for express request and response with request wide state storage and retrieval
Downloads
13
Readme
Wrapper for express request and response with request wide state storage and retrieval
NPM
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'
Discover the release history by heading on over to the releases page.
These amazing people are maintaining this project:
These amazing people have contributed finances to this project:
Become a sponsor!
These amazing people have contributed code to this project:
Unless stated otherwise all works are:
and licensed under: