-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from request to axios for http(s)
Since request is no longer receiving updates, switch to axios. Attempt to keep the same options as much as possible. However these changes occurred in the switch: 1. There is only one option for redirects `followRedirect: true|false` (defaults to true). 2. `httpSignature` is not implemented in axios and now not available. (If this feature is still desired, please help by providing a pull request to implement it.) 3. `auth` now allows `username` and `password` but not the aliases `user` and `pass`
- Loading branch information
Showing
7 changed files
with
534 additions
and
708 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
module.exports = { | ||
// specify additional options here, especially http(s) | ||
// see https://github.com/request/request#readme for specifics | ||
ca: [ /* strings or binaries */], | ||
cert: [ /* strings or binaries */], | ||
key: [ /* strings or binaries */], | ||
// see https://nodejs.org/api/tls.html#tls_tls_connect_options_callback for specifics | ||
ca: [ | ||
/* strings or binaries */ | ||
], | ||
cert: [ | ||
/* strings or binaries */ | ||
], | ||
key: [ | ||
/* strings or binaries */ | ||
], | ||
passphrase: 'yourpassphrase', | ||
auth: { | ||
user: 'yourusername', | ||
pass: 'yourpassword' | ||
}, | ||
httpSignature: { | ||
keyId: 'keyId', | ||
key: 'yourkey' | ||
pass: 'yourpassword', | ||
}, | ||
strictSSL: false, | ||
followAllRedirects: false, | ||
followRedirect: false, | ||
headers: { | ||
'x-custom': 'headers' | ||
} | ||
'x-custom': 'headers', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.