This method will not work correctly if any individual part contains a special character. For example, if an item in the path contains a "#", the regex will return an incorrect result. Likewise, if any item in a query string contains an "&" the query string will be correctly escaped. All urls supplied to the http client must be escaped by the consumer. Signed-off-by: Eric Callahan <arksine.code@gmail.com>