Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
document Promise based API
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jun 9, 2017
1 parent e746ace commit d75f37b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ You can consume this PAC file with `pac-resolver` like so:
var fs = require('fs');
var pac = require('pac-resolver');

var FindProxyForURL = pac(fs.readFileSync('proxy.pac', 'utf8'));
var FindProxyForURL = pac(fs.readFileSync('proxy.pac'));

FindProxyForURL('http://foo.com/', 'foo.com', function (err, res) {
if (err) throw err;
FindProxyForURL('http://foo.com/').then((res) => {
console.log(res);
// "DIRECT"
// "DIRECT"
});
```

Expand Down

0 comments on commit d75f37b

Please sign in to comment.