Using slash character in path segments

I have a question about using user-supplied data in a http URI that has a
forward slash character ('/' - the path separator). I would like to place
this data in the path portion of the URI, rather than a query term. Is this
simply not possible, a bad idea or just troublesome due to encoding issues?

For example, we are defining service APIs in a pure HTTP that accept product
keys (a SKU) that can contain most any character. I'd like to use paths
rather than query terms (for no particular reason) and was wondering how to
support data with a '/' character.

>From RFC3986 "If data for a URI component would conflict with a reserved
character's purpose as a delimiter, then the conflicting data must be
percent-encoded before the URI is formed." it seems that we merely need to
instruct client applications to encode the user supplied data according to
path-segment encoding rules (in this case, percent encoding of the slash
character).

Has anyone done this and if so, what issues have they found?

Received on Monday, 29 May 2006 20:36:05 UTC