0.7.0 • Published 1 year ago

request-light v0.7.0

Weekly downloads
63,303
License
MIT
Repository
github
Last release
1 year ago

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());
});
0.7.0

1 year ago

0.6.0

1 year ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.5

5 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago