Socket
Socket
Sign inDemoInstall

fetch

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

20

lib/fetch.js

@@ -172,6 +172,2 @@ 'use strict';

if ('agent' in this.options) {
urloptions.agent = this.options.agent;
}
switch (urlparts.protocol) {

@@ -187,2 +183,18 @@ case 'https:':

if (transport === https) {
if('agentHttps' in this.options){
urloptions.agent = this.options.agentHttps;
}
if('agent' in this.options){
urloptions.agent = this.options.agent;
}
} else {
if('agentHttp' in this.options){
urloptions.agent = this.options.agentHttp;
}
if('agent' in this.options){
urloptions.agent = this.options.agent;
}
}
if (!urloptions.port) {

@@ -189,0 +201,0 @@ switch (urlparts.protocol) {

8

package.json
{
"name": "fetch",
"description": "Fetch URL contents",
"version": "1.0.0",
"version": "1.0.1",
"author": "Andris Reinman",

@@ -21,7 +21,7 @@ "homepage": "http://github.com/andris9/fetch",

"devDependencies": {
"chai": "^3.4.1",
"chai": "^3.5.0",
"grunt": "^0.4.5",
"grunt-eslint": "^17.3.1",
"grunt-eslint": "^17.3.2",
"grunt-mocha-test": "^0.12.7",
"mocha": "^2.3.4"
"mocha": "^2.4.5"
},

@@ -28,0 +28,0 @@ "keywords": [

@@ -83,3 +83,5 @@ # fetch

* **timeout** set a timeout in ms
* **agent** pass-through http.request agent parameter
* **agentHttps** pass-through http.request agent parameter for https
* **agentHttp** pass-through http.request agent parameter for http
* **agent** pass-through http.request agent parameter as fallback, if agentHttps or agentHttp are not specified
* **rejectUnauthorized** whether to reject self-signed certificates (`true`, default behavior), or ignore and allow them (`false`)

@@ -86,0 +88,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc