From 64613ea4c8564bac9477658244e5bef554b0b1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 30 May 2019 09:36:12 +0600 Subject: [PATCH] Update web3-providers readme --- packages/web3-providers/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}` } };