Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # mimic-response [![Build Status](https://travis-ci.org/sindresorhus/mimic-response.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-response)
  2. > Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
  3. ## Install
  4. ```
  5. $ npm install mimic-response
  6. ```
  7. ## Usage
  8. ```js
  9. const stream = require('stream');
  10. const mimicResponse = require('mimic-response');
  11. const responseStream = getHttpResponseStream();
  12. const myStream = new stream.PassThrough();
  13. mimicResponse(responseStream, myStream);
  14. console.log(myStream.statusCode);
  15. //=> 200
  16. ```
  17. ## API
  18. ### mimicResponse(from, to)
  19. #### from
  20. Type: `Stream`
  21. [Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
  22. #### to
  23. Type: `Stream`
  24. Any stream.
  25. ## Related
  26. - [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one
  27. - [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream
  28. ## License
  29. MIT © [Sindre Sorhus](https://sindresorhus.com)