In Addition to @Yifei answer. If you have special character like @, &, $
You have to go with percent-encode | encode the special characters. E.g. instead of this:
http://foo:B@[email protected]:80
you write this:
http://foo:B%[email protected]:80
So @
gets replaced with %40
.