Socket
Socket
Sign inDemoInstall

apollo-datasource-http

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-datasource-http - npm Package Compare versions

Comparing version 0.14.0 to 0.14.1

11

dist/src/http-data-source.js

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

});
responseData.body.setEncoding('utf8');
let data = '';

@@ -147,5 +146,7 @@ for await (const chunk of responseData.body) {

}
let json;
if (data) {
json = secure_json_parse_1.default.parse(data);
let json = null;
if (responseData.headers['content-type']?.includes('application/json')) {
if (data !== '') {
json = secure_json_parse_1.default.parse(data);
}
}

@@ -156,3 +157,3 @@ const response = {

...responseData,
body: json,
body: json ?? data,
};

@@ -159,0 +160,0 @@ this.onResponse(request, response);

{
"name": "apollo-datasource-http",
"version": "0.14.0",
"version": "0.14.1",
"author": "Dustin Deus <deusdustin@gmail.com>",

@@ -5,0 +5,0 @@ "license": "MIT",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc