New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gohttp

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gohttp - npm Package Compare versions

Comparing version 3.2.0-beta5 to 3.2.1

53

gohttp.js

@@ -50,5 +50,3 @@ 'use strict';

hash : u.hash,
host : u.host,
hostname : u.hostname,
port : u.port,
protocol : u.protocol,

@@ -68,4 +66,5 @@ path : u.pathname,

urlobj.path = sockarr[1];
delete urlobj.host;
delete urlobj.port;
} else {
urlobj.host = u.host;
urlobj.port = u.port;
}

@@ -541,48 +540,2 @@

/**
* 快速代理模式要求你传递解析后的url对象以及其他选项,选项值参考http模块的request接口。
* 代理模式仅仅是提供了一个双向的数据传输管道。你要通过writeto传递一个可写的流,在web中就是response。
*
* request --------> proxy ----> backend server
* [readfrom]
*
* response <-------- proxy <---- backend server
* [writeto]
*
*/
gohttp.prototype.fastproxy = function (url, readfrom, writeto, autoend = true) {
let h = (opts.protocol === 'https:') ? https : http;
return new Promise((rv, rj) => {
let r = h.request(opts, (res) => {
res.on('data', chunk => {
writeto.write(chunk);
});
res.on('end', () => {
if (autoend) {
writeto.end();
}
rv(true);
});
res.on('error', err => {
rj(err);
});
});
readfrom.on('data', chunk => {
r.write(chunk);
});
readfrom.on('end', () => {
r.end();
});
});
};
module.exports = new gohttp();

@@ -589,0 +542,0 @@

2

package.json
{
"name": "gohttp",
"version": "3.2.0-beta5",
"version": "3.2.1",
"description": "http client for HTTP/1.1",

@@ -5,0 +5,0 @@ "main": "gohttp.js",

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