Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRibreau committed Aug 1, 2018
1 parent 3397bd6 commit 9e54d89
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,16 @@ request({
});
```

## How to extend the default request
## How to access the underlying request library

You can access to the underlying `request` library thanks to `request.Request`:

```javascript
const request = require('requestretry');
console.log(request.Request); // original request library
```

Thus, if needed, it's possible to monkey-patch or extend the underlying Request library:

```javascript
request.Request = class extends request.Request {
Expand Down

0 comments on commit 9e54d89

Please sign in to comment.