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@r@http-gateway.domain.org:80
you write this:
http://foo:B%40r@http-gateway.domain.org:80
So @ gets replaced with %40.