Use byte strings when generating the request for the url as well

When generating requests, it is recommended to use byte strings for all parameters. We converted the body to a byte string but forgot the case where the url maybe in unicode as well.