Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

supra-http

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supra-http - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

dist/client.js

@@ -28,3 +28,3 @@ "use strict";

return circuit
.fire(url, options);
.fire(url, options || {});
}

@@ -31,0 +31,0 @@ createCircuit(name, options) {

@@ -10,2 +10,3 @@ "use strict";

const enums_1 = require("./enums");
const fast_url_parser_1 = __importDefault(require("fast-url-parser"));
class Http {

@@ -34,3 +35,3 @@ constructor() {

return new Promise(resolve => {
const request = requestProvider.client.request(url, options, response => {
const request = requestProvider.client.request(options, response => {
compression_1.Compression.handle(response)

@@ -48,6 +49,10 @@ .then(body => resolve({

}
createRequestOptions(url, options, agent, bodyContent) {
createRequestOptions(targetUrl, options, agent, bodyContent) {
const url = fast_url_parser_1.default.parse(targetUrl);
const mergedOptions = {
method: options.method || 'get',
agent,
hostname: url.host,
protocol: url._protocol + ':',
path: url.pathname + (url.search || ''),
headers: Object.assign(Object.assign({}, options.headers), { 'accept-encoding': compression_1.Compression.getSupportedStreams() })

@@ -54,0 +59,0 @@ };

{
"name": "supra-http",
"version": "1.0.3",
"version": "1.0.4",
"description": "Circuit breaking http client for NodeJs. And it is fast...",

@@ -24,2 +24,3 @@ "main": "./dist/index.js",

"dependencies": {
"fast-url-parser": "^1.1.3",
"opossum": "^4.1.0",

@@ -39,2 +40,5 @@ "opossum-hystrix": "0.0.1"

"jest": "^24.9.0",
"nock": "^11.6.0",
"request": "^2.88.0",
"requestretry": "^4.0.2",
"sinon": "^7.5.0",

@@ -41,0 +45,0 @@ "ts-jest": "^24.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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