Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esatterwhite/micromock-node
Minimal HTTP Request / Response object for node js
https://github.com/esatterwhite/micromock-node
http mock nodejs skyring
Last synced: about 2 months ago
JSON representation
Minimal HTTP Request / Response object for node js
- Host: GitHub
- URL: https://github.com/esatterwhite/micromock-node
- Owner: esatterwhite
- License: mit
- Created: 2018-11-24T19:24:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-05T02:25:06.000Z (over 5 years ago)
- Last Synced: 2024-10-14T15:03:11.022Z (3 months ago)
- Topics: http, mock, nodejs, skyring
- Language: JavaScript
- Size: 43 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# micromock-node
Minimal HTTP Request / Response object for node jsInitiall implemented for [skyring](https://github.com/esatterwhite/skyring) and a replacement for [hammock](https://github.com/doanythingfordethklok/hammock)
for use in [ringpop](https://github.com/esatterwhite/ringpop-node) while adding support for node >= 10```js
const {Request, Response} = require('micromock')var req = new new Request({
url: '/foo',
headers: { host: 'localhost', bar: 'baz' },
method: 'GET'
}),
res = new Response();res.on('end', function(err, data) {
console.log(data.statusCode);
console.log(util.inspect(data.headers));
console.log(data.body);
});
```