package
Lightweight request library. Promise based, with proxy support.
npm install request-lightGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
31.2 kB
Includes dependencies.
A lightweight request library intended to be used by VSCode extensions.
configure or HTTP_PROXY and HTTPS_PROXY env variables to configure the HTTP proxy addresses.import { xhr, XHRResponse, getErrorStatusDescription } from 'request-light';
const headers = { 'Accept-Encoding': 'gzip, deflate' };
return xhr({ url: url, followRedirects: 5, headers }).then(response => {
return response.responseText;
}, (error: XHRResponse) => {
throw new Error(error.responseText || getErrorStatusDescription(error.status) || error.toString());
});microsoft-oss-releases
microsoft-oss-publishing@microsoft.com