New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.4 to 1.0.7

7

dist/http.js

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

const options = this.createRequestOptions(url, requestOptions, requestProvider.agent, requestBody);
return new Promise(resolve => {
return new Promise((resolve, reject) => {
const request = requestProvider.client.request(options, response => {

@@ -42,2 +42,4 @@ compression_1.Compression.handle(response)

});
request.on('error', reject);
request.on('timeout', request.abort);
if (requestBody) {

@@ -59,2 +61,5 @@ request.write(requestBody);

};
if (options.timeout) {
mergedOptions.timeout = options.timeout;
}
if (options.json) {

@@ -61,0 +66,0 @@ mergedOptions.headers['content-type'] = enums_1.CONTENT_TYPE.ApplicationJson;

2

dist/types.d.ts

@@ -9,5 +9,5 @@ /// <reference types="node" />

headers?: Record<string, string>;
timeout?: number;
}
interface RequestOptions extends CircuitBreaker.Options, HttpRequestOptions {
timeout?: number;
}

@@ -14,0 +14,0 @@ interface ClientResponse {

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

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

"build": "node ./node_modules/.bin/tsc",
"bench": "npm run build && node ./benchmark/index.js",
"build:watch": "node ./node_modules/.bin/tsc --watch",

@@ -20,0 +21,0 @@ "test:watch": "jest --coverage --watchAll"

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