News for hackers. Stuff that matters.
Re:Use links not keys to represent relationships in APIs by asaph on Sunday May 12, 2019 @11:24AM (#19892451)
You still have to keep deprecated URLs responsive in order to issue HTTP 301 redirects. And until 100% of legacy clients update their calling code (could be never), you can't remove support without breaking the system for legacy clients.
Re:Use links not keys to represent relationships in APIs by ddalex on Sunday May 12, 2019 @11:53AM (#19892637)
Yeah, but it doesn't mean you have to serve them from the same codebase. Partition the old urls to a thin service that only does the URL transcription and issues the 301 and you're done
Re:Use links not keys to represent relationships in APIs by carapace on Sunday May 12, 2019 @12:25PM (#19892837)
I'm thinking of moving some docs now, as it happens, and it looks like all I'll need to do to serve 301's for them is put a few lines in an .htaccess file.

My deeper point is that all this has been hashed out and settled by now. If you're still having this problem in 2019 you're either playing around or "Doing It Wrong".

Re:Use links not keys to represent relationships in APIs by asaph on Sunday May 12, 2019 @12:50PM (#19892959)
Another thing to keep in mind is that HTTP 301 redirects are typically only followed for GET requests. POST, PUT & DELETE requests will still be broken.
Re:Use links not keys to represent relationships in APIs by M2Ys4U on Sunday May 12, 2019 @06:23PM (#19894965)
That's what 308 is for
Re:Use links not keys to represent relationships in APIs by asaph on Sunday May 12, 2019 @07:56PM (#19895412)
Thanks. I never knew about the HTTP 308 response code. Here is the RFC dated June 2014:

https://tools.ietf.org/html/rfc7238