urequest => @coolaj86/urequest (someone just claimed it over the weekend)

This commit is contained in:
AJ ONeal 2018-06-18 20:00:19 -06:00
parent a935ea7d1b
commit fc92c66be8
1 changed files with 6 additions and 2 deletions

View File

@ -8,8 +8,12 @@ Written from scratch.
µRequest is designed to be a drop-in replacement for request. It supports HTTPS and follows redirects by default.
```bash
npm install @coolaj86/urequest
```
```js
var request = require('urequest');
var request = require('@coolaj86/urequest');
request('http://www.google.com', function (error, response, body) {
console.log('error:', error); // Print the error if one occurred
console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
@ -117,7 +121,7 @@ There are at least <!--three--> two ways to debug the operation of `request`:
1. Launch the node process like `NODE_DEBUG=urequest node script.js`
(`lib,request,otherlib` works too).
2. Set `require('urequest').debug = true` at any time (this does the same thing
2. Set `require('@coolaj86/urequest').debug = true` at any time (this does the same thing
as #1).
<!--