- Adds a
.header
and.get
method to the request.
- Adds a
.header
,.set
, and.get
method to the response.
- Adds the MIT license
-
Merged changes by invernizzie: to address #11
-
Merged changes by ericchaves:
I extended your library a little but so it could also handle some structured responses. By doing so res.send now evaluate the data passed and search for either a statusCode or httpCode to be used, and also for a body to send as _data.
It still working as expected (at least tests passed) for regular HTTP responses.
Although I did it with node-restify in mind, it should work well for all other libs.
- Adds a
.json()
method to the response. (Thanks, diachedelic) - Cleaned up all source files so ./run-tests passes.
- Cleaned up jshint issues.
- Adds support for response redirect and render
- Adds support for response cookies
- Adds support for request headers
- Fix wrong function name of set cookies
- Adds support for request cookies
- Adds support for request files
- Fixed a bug where
response.send()
can take two parameters, the status code and the data to send.
- Adds a
request.session
that can be set during construction (or via calling the_setSessionVariable()
method, and read as an object.
- Adds a
request.query
that can be set during construction and read as an object.
- Code refactoring of the
Response
mock.
- Initial code banged out one late night...