Suggest encoding which removes slashes which I can use as the format for REST-style URL-paramteters

Posted by Binary255 on Stack Overflow See other posts from Stack Overflow or by Binary255
Published on 2010-03-12T15:56:32Z Indexed on 2010/03/12 15:57 UTC
Read the original article Hit count: 177

Filed under:
|
|
|
|

Given a path to a REST style URL:

http://site.com/rest/customer/foo/robot/bar/1

When you GET it, it returns a PDF to the foo-customer containing page 1 of the bar-URL.

While foo is the name of the customer bar is an URL. The URL usually contains slashes and might look something like this:

http://anothersite.com/interestingarticle.html

As REST URL's separate arguments by slashes I can't just put it into the REST URL above. Which encoding should I use? I can't use Base 64 as it utilizes the slash as well.

As a technical note I will encode the URL in a .NET-application and decode it in PHP.

© Stack Overflow or respective owner

Related posts about rest

Related posts about encoding