Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jul 8, 2024
1 parent d6d9be5 commit 66d790f
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 @@ -21,9 +21,7 @@ const net = ftch(fetch, {
timeout: 5000,
concurrencyLimit: 10,
});
const result = await net('https://example.com');

net('https://user:[email protected]/basic-auth/user/pwd'); // Basic auth
const res = await net('https://example.com');

// Composable
const rpc = jsonrpc(net, 'http://rpc_node/', {
Expand All @@ -32,8 +30,9 @@ const rpc = jsonrpc(net, 'http://rpc_node/', {
});
const res1 = await rpc.call('method', 'arg0', 'arg1');
const res2 = await rpc.callNamed('method', { arg0: '0', arg1: '1' }); // named arguments

const testRpc = replayable(rpc);
// Basic auth auto-parsing
await net('https://user:[email protected]/basic-auth/user/pwd');
```

- [ftch](#ftch)
Expand Down

0 comments on commit 66d790f

Please sign in to comment.