from Hacker News

Ask HN: HTTP Path vs. Query Parameters

by lunch on 4/11/19, 5:53 PM with 3 comments

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>
  • by nonsapreiche on 4/11/19, 6:21 PM

    I use the first if video_id can not fit in a hierarchical model