On 2/4/2019 7:31 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Garret,

On 2/3/19 16:20, Garret Wilson wrote:
If we want to look up the thing identified by
https://example.info/foobar, we would need to issue a request to
https://example.com/https%3A%2F%2Fexample.info%2Ffoobar/description
Why
are you %-encoding the slashes at all? They are perfectly legal as-is.


Hmmm… So let's say my RESTful API endpoint is https://example.com/{thingURI}/description as I mentioned. (Yes, I know that RESTful APIs don't have to be meaningful or structured as long as we use HATEOAS, but… a lot of us like them.) So you're saying that to request information for the resource https://example.info/foobar, I would send a GET request to:

https://example.com/https%3A//example.info/foobar/description

That raises all sorts of questions, such as

 * The double slash is OK? Really!??
 * Is there any RESTful API framework on the planet that would realize
   the URI path "/https%3A//example.info/foobar/description" matched
   "{thingURI}/description"? So if I'm using JAX-RS with a
   @Path("{thingURI}/description") with a string @PathParam("thingURI")
   thing, JAX-RS would set the "thing" parameter to
   "https://example.info/foobar";?? I highly doubt that.

Either I'm missing something and I'm going to learn something cool; or you missed some of the details of what I wrote. :) If I'm missing something, please explain because I'm ready to learn!

Garret

Reply via email to