2.88.7 • Published 2 years ago
@ayakashi/request v2.88.7
Request - Simplified HTTP client
Fork of request
Includes the following:
- Adds Brotli support
- Bundles request-promise-native and uses Promises by default
- Bundles updated typescript definitions that use Promises
- Updates/removes some packages that have security vulnerabilities
Installing
npm install --save @ayakashi/requestUsing Brotli
Just pass gzipOrBrotli: true in the options instead of just gzip: true
const request = require("@ayakashi/request");
const body = await request.get('https://www.google.com', {
gzipOrBrotli: true
});Using the callback-based interface
Require @ayakashi/request/core instead of @ayakashi/request.
Brotli is available here as well.
const request = require("@ayakashi/request/core");
request.get('https://www.google.com', {gzipOrBrotli: true}, function(err, resp, body) {
console.log(body);
});