📜 ⬆️ ⬇️

node-get

In the Node engine, the built-in means of sending requests to remote web servers (and processing the received responses) is the http.request ( ... ) method, but it turns out to be too low-level: if a server redirect is configured at the far end, this method will give you a page with the HTTP code 301 (or HTTP 302, or HTTP 303 ...), not the page or the file that the redirect points to.

The node-get module, developed by Development Seed , helps to overcome this drawback: it automatically processes redirects and receives the final response to the sent request.

The module API allows you to receive both text (as a javascript line) and binary code (as a javascript buffer) from the Web; if necessary, automated recording of the received data to disk as a file is also supported.
')
The module code is open and distributed under the free BSD license .

Source: https://habr.com/ru/post/142577/


All Articles