Re:Don't just shorten your URL, make it suspicious and frigh...
by dcow on Tuesday June 15, 2021 @11:20PM
(#27524527)
What if my resource is indexed by GUID and I want to build a REST API?
[ Parent
| on HN ]
Re:Don't just shorten your URL, make it suspicious and frigh...
by mewpmewp2 on Wednesday June 16, 2021 @05:13AM
(#27526484)
For REST APIs standard would be /resources?query=something&offset=50&limit=50 etc for list of resources. And single resource.
/resources/:resourceId, so a bit different for APIs as opposed to user facing urls.
While for a single resource when user facing it would be /resource/human-readable-resource-slug.
Re:Don't just shorten your URL, make it suspicious and frigh...
by MaxBarraclough on Wednesday June 16, 2021 @04:02AM
(#27526058)
That wouldn't force you to use query strings.
I agree it's not always a mistake for a URL to contain an ID value of some sort. How else would online shops assign a URL to each product they offer?