diff --git a/packages/web3-providers/README.md b/packages/web3-providers/README.md index d9b28d174fb..6d030769088 100644 --- a/packages/web3-providers/README.md +++ b/packages/web3-providers/README.md @@ -36,10 +36,11 @@ Instead of setting a authorization header you could also define the credentials ```js import {WebsocketProvider} from 'web3-providers'; +const credentials = Buffer.from('username:password').toString('base64') const options = { timeout: 30000, headers: { - authorization: 'Basic username:password' + authorization: `Basic ${credentials}` } };