for frontend, what’s the difference between /videos?watch={id} and /videos/{id}
tags: learning programming diff-between
content
from rest-api-difference, i thought i understood this concept, but i saw that YouTube has https://www.youtube.com/watch?v=vHCY0nRI9_M for it’s videos
Note
there’s a difference between public facing url and internal restful api
-
in the case of
youtube.com/watch?v=123, this is a page displayed on the frontend -
it’s not used for resource identification
-
frontend http requests to backend might still be
/video/{id} -
of course, there’s some historical reasons behind
- when youtube got started, REST design is not popular yet, so youtube didn’t use it
- and now its for backward compatibility, there’s no need to change it as well