Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/request/request
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinvanrijn committed Sep 24, 2024
2 parents e5d7007 + 3c0cddc commit e993e40
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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.
});
Expand Down Expand Up @@ -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'))
```
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/getProxyFromURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || ''

Expand Down

0 comments on commit e993e40

Please sign in to comment.