I have geth running in remote server and is protected using HTTP Basic Auth.
I tried the below two methods. both don't work:
let web3 = new Web3(
new Web3.providers.HttpProvider(
'http://' + "username" + ':' + "password" + '@'+ "52.43.83.54/iimigdmb" + ':' + "31988"
)
)
As per official docs:
web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://' + "52.43.83.54/iimigdmb" + ':' + "31988", 5000, "sad", "asd"));
Is there any other way to achieve this: