diff --git a/CHANGELOG.md b/CHANGELOG.md index 751514d28..d3ffcd00d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ## Change Log +### v2.88.0 (2018/08/10) +- [#2996](https://github.com/request/request/pull/2996) fix(uuid): import versioned uuid (@kwonoj) +- [#2994](https://github.com/request/request/pull/2994) Update to oauth-sign 0.9.0 (@dlecocq) +- [#2993](https://github.com/request/request/pull/2993) Fix header tests (@simov) +- [#2904](https://github.com/request/request/pull/2904) #515, #2894 Strip port suffix from Host header if the protocol is known. (#2904) (@paambaati) +- [#2791](https://github.com/request/request/pull/2791) Improve AWS SigV4 support. (#2791) (@vikhyat) +- [#2977](https://github.com/request/request/pull/2977) Update test certificates (@simov) + ### v2.87.0 (2018/05/21) - [#2943](https://github.com/request/request/pull/2943) Replace hawk dependency with a local implemenation (#2943) (@hueniverse) diff --git a/README.md b/README.md index e818a2b4d..99584c2d3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Deprecated! + +As of Feb 11th 2020, request is fully deprecated. No new changes are expected to land. In fact, none have landed for some time. + +For more information about why request is deprecated and possible alternatives refer to +[this issue](https://github.com/request/request/issues/3142). # Request - Simplified HTTP client @@ -26,7 +32,7 @@ Request is designed to be the simplest way possible to make http calls. It suppo ```js const request = require('postman-request'); request('http://www.google.com', function (error, response, body) { - console.log('error:', error); // Print the error if one occurred + console.error('error:', error); // Print the error if one occurred console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received console.log('body:', body); // Print the HTML for the Google homepage. }); @@ -94,7 +100,7 @@ To easily handle errors when streaming requests, listen to the `error` event bef request .get('http://mysite.com/doodle.png') .on('error', function(err) { - console.log(err) + console.error(err) }) .pipe(fs.createWriteStream('doodle.png')) ``` @@ -966,12 +972,9 @@ request.defaults({ work around this, either use [`request.defaults`](#requestdefaultsoptions) with your pool options or create the pool object with the `maxSockets` property outside of the loop. -- `timeout` - integer containing number of milliseconds, controls two timeouts - - Time to wait for a server to send response headers (and start the response body) before aborting the request. - Note that if the underlying TCP connection cannot be established, - the OS-wide TCP connection timeout will overrule the `timeout` option ([the - default in Linux can be anywhere from 20-120 seconds][linux-timeout]). - - Sets the socket to timeout after `timeout` milliseconds of inactivity on the socket. +- `timeout` - integer containing number of milliseconds, controls two timeouts. + - **Read timeout**: Time to wait for a server to send response headers (and start the response body) before aborting the request. + - **Connection timeout**: Sets the socket to timeout after `timeout` milliseconds of inactivity. Note that increasing the timeout beyond the OS-wide TCP connection timeout will not have any effect ([the default in Linux can be anywhere from 20-120 seconds][linux-timeout]) [linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout diff --git a/lib/getProxyFromURI.js b/lib/getProxyFromURI.js index 4633ba5f6..0b9b18e5a 100644 --- a/lib/getProxyFromURI.js +++ b/lib/getProxyFromURI.js @@ -40,7 +40,7 @@ function uriInNoProxy (uri, noProxy) { function getProxyFromURI (uri) { // Decide the proper request proxy to use based on the request URI object and the // environmental variables (NO_PROXY, HTTP_PROXY, etc.) - // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) + // respect NO_PROXY environment variables (see: https://lynx.invisible-island.net/lynx2.8.7/breakout/lynx_help/keystrokes/environments.html) var noProxy = process.env.NO_PROXY || process.env.no_proxy || ''