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

http4js

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http4js - npm Package Compare versions

Comparing version 4.2.4 to 4.2.5

5

client/HttpClient.js

@@ -32,6 +32,9 @@ "use strict";

var requestOptions = __assign({}, options, { headers: headers, method: req.method });
return new Promise(function (resolve) {
return new Promise(function (resolve, reject) {
var clientRequest = http.request(requestOptions, function (res) {
return resolve(Res_1.ResOf(res.statusCode, res, res.headers));
});
clientRequest.on('error', function (err) {
reject(err);
});
if (req.bodyStream()) {

@@ -38,0 +41,0 @@ req.bodyStream().pipe(clientRequest);

@@ -31,6 +31,9 @@ import * as http from "http";

return new Promise(resolve => {
return new Promise((resolve, reject) => {
const clientRequest = http.request(requestOptions, (res: IncomingMessage) => {
return resolve(ResOf(res.statusCode, res, res.headers as HeadersJson));
});
clientRequest.on('error', (err) => {
reject(err);
});
if (req.bodyStream()){

@@ -37,0 +40,0 @@ req.bodyStream()!.pipe(clientRequest);

2

core/Res.d.ts

@@ -20,3 +20,3 @@ /// <reference types="node" />

bodyStream(): Readable | undefined;
bigBodyString(): Promise<string>;
fullBodyString(): Promise<string>;
static OK(body: BodyContent, headers?: {}): Res;

@@ -23,0 +23,0 @@ static Created(body: BodyContent, headers?: {}): Res;

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

};
Res.prototype.bigBodyString = function () {
Res.prototype.fullBodyString = function () {
return __awaiter(this, void 0, void 0, function () {

@@ -85,0 +85,0 @@ return __generator(this, function (_a) {

@@ -59,3 +59,3 @@ import {BodyContent, HeadersJson, HttpMessage} from "./HttpMessage";

async bigBodyString(): Promise<string> {
async fullBodyString(): Promise<string> {
return this.body.fullBodyString();

@@ -62,0 +62,0 @@ }

{
"name": "http4js",
"version": "4.2.4",
"version": "4.2.5",
"description": "A lightweight HTTP toolkit",

@@ -5,0 +5,0 @@ "main": "dist/index.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