Skip to content

A light weight nodejs request library with proxy support. Intended to be used by VSCode extensions

License

Notifications You must be signed in to change notification settings

microsoft/node-request-light

Folders and files

NameName
Last commit message
Last commit date

Latest commit

91554d6 · Apr 14, 2025

History

90 Commits
Jul 1, 2024
Jul 1, 2024
Nov 9, 2023
Jul 12, 2021
Jul 1, 2024
Jun 24, 2024
Jul 12, 2021
Jul 12, 2021
Apr 18, 2016
Nov 3, 2022
Sep 1, 2022
Jan 23, 2023
Jun 24, 2024
Apr 14, 2025
Jul 2, 2024
Jan 7, 2022

Repository files navigation

request-light

npm Package NPM Downloads Build Status License: MIT

A lightweight request library intended to be used by VSCode extensions.

  • NodeJS and browser main entry points
  • proxy support: Use 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());
});

About

A light weight nodejs request library with proxy support. Intended to be used by VSCode extensions

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published