3 ms·
But doesn't << /fred.md >> beat the heck out of something like << /fred?format=md >>?
by euroderf 3y ago
But doesn't << /fred.md >> beat the heck out of something like << /fred?format=md >>?
- incrudible 3y agoFrom a URL aesthetics perspective, yes. Otherwise it just adds yet another dimension of how to pass a parameter.
- capableweb 3y agoDepends. Including it in the location part of the URL could make it harder to understand if you have multiple parameters, instead of just one. Using query parameters makes it very explicit, which can be good or bad depending on your use case, while sticking it into the URL makes it implicit. Together with that, you can also go for putting it in the `hash` part of the URL, if you want to keep it a secret from the server, as the server doesn't receive those parts, `/fred/#format=md`. In this case, it doesn't make much sense, but useful to know for other things, like keys and whatnot.
- matt-attack 3y agoIs don’t think I that hash method would work since that part of the URL isn’t sent to the server. It’s strictly used by the client to decide which part of the response we to show. Server has no need for it.