request-light
Lightweight request library. Promise based, with proxy support.
Last updated 8 years ago by aeschli .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install request-light 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.7.0                                ...           latest (2 years ago)

23 Versions

  • 0.7.0                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.8                                ...           3 years ago
  • 0.5.7                                ...           3 years ago
  • 0.5.6                                ...           3 years ago
  • 0.5.5                                ...           3 years ago
  • 0.5.4                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.5                                ...           5 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           7 years ago
  • 0.2.2                                ...           7 years ago
  • 0.2.1                                ...           8 years ago
  • 0.2.0                                ...           8 years ago
  • 0.1.0                                ...           9 years ago
  • 0.0.3                                ...           9 years ago
  • 0.0.2                                ...           9 years ago
  • 0.0.1                                ...           9 years ago
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |