News for hackers. Stuff that matters.

Ask HN: HTTP Path vs. Query Parameters

What sort of design considerations might sites like YouTube use when deciding between path or query parameters for identifying resources?

For example, YouTube uses a query param 'v' to specify a video id:

  youtube.com/watch?v=<video_id>
Instead of sticking it in the path:

  youtube.com/watch/<video_id>
( 3 comments | 2 points | on HN )
Re:Ask HN: HTTP Path vs. Query Parameters by nonsapreiche on Thursday April 11, 2019 @02:21PM (#19637570)
I use the first if video_id can not fit in a hierarchical model
Re:Ask HN: HTTP Path vs. Query Parameters by highhedgehog on Friday April 12, 2019 @10:38AM (#19645157)
Can you elaborate, I am interested? What do you mean by "if video_id cannot fit in a hierarchical model"?
Re:Ask HN: HTTP Path vs. Query Parameters by nonsapreiche on Sunday April 21, 2019 @12:49PM (#19713011)
Like a matrix versus a tree