Skip to content

Commit

Permalink
chore(proxy-container): update README for proper request forwarding (#…
Browse files Browse the repository at this point in the history
…8692)

* chore(proxy-container): update README for proper request forwarding

* chore: remove unused import

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
didinele and kodiakhq[bot] committed Oct 1, 2022
1 parent d24dbf7 commit 6398e46
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/proxy-container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,25 @@ Use it:

```ts
import { Client } from 'discord.js';
import { ProxyAgent } from 'undici';

const client = new Client({
// other options,
rest: {
agent: new ProxyAgent('https://localhost:8080'),
api: 'http://localhost:8080/api',
},
});
```

Or with just `@discordjs/rest`:

```ts
import { REST } from '@discordjs/rest';

const rest = new REST({
api: 'http://localhost:8080/api',
});
```

## Links

- [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))
Expand Down

0 comments on commit 6398e46

Please sign in to comment.