chore(proxy-container): update README for proper request forwarding (#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>
This commit is contained in:
DD
2022-10-01 16:40:24 +03:00
committed by GitHub
parent d24dbf7d22
commit 6398e46043

View File

@@ -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))