Comparing version 5.1.0 to 5.1.1
@@ -80,3 +80,3 @@ const http = require('http') | ||
if (opts.json) { | ||
try { data = JSON.parse(data.toString()) } catch (e) { return cb(e, response, data) } | ||
try { data = data.length > 0 ? JSON.parse(data.toString()) : null } catch (e) { return cb(e, response, data) } | ||
} | ||
@@ -83,0 +83,0 @@ cb(null, response, data) |
{ | ||
"name": "rock-req", | ||
"description": "Zero deps (160 LOC) & ultra-fast request library: http/https, reliable retry on failure, redirects, gzip/deflate/brotli, extensible, proxy, streams, JSON mode, forms, timeout", | ||
"version": "5.1.0", | ||
"description": "Ultra-light (150 LOC, No dependencies) & Ultra-fast request library with reliable retry on failure, http/https, redirects, gzip/deflate/brotli, extensible, proxy, streams, JSON mode, forms, timeout", | ||
"version": "5.1.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "David Grelaud & Feross Aboukhadijeh" |
@@ -9,2 +9,3 @@ | ||
<p align="center">⭐️⭐️ Ensure your HTTP requests always reach their destination as <b>efficiently</b> as possible! ⭐️⭐️</p> | ||
<p align="center">Tested on Mac, Linux, Windows with NodeJS 16, 18, 19</p> | ||
@@ -72,3 +73,3 @@ [![npm][npm-image]][npm-url] [![ci][ci-image]][ci-url] [![javascript style guide][standard-image]][standard-url] | ||
> `rock-req` uses only the native NodeJS http module and provides many high-level features, a lot more than `phin` and `simple-get` with fewer lines | ||
> `rock-req` uses only the native NodeJS http module and provides many high-level features, a lot more than `phin` and `simple-get` with fewer lines of code. | ||
@@ -75,0 +76,0 @@ > Tested with NodeJS 18.x LTS on Macbook Pro M1 Max |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29654
620