Home / Series / Destroy All Software / Aired Order / Season 8 / Episode 2
Home / Series / Destroy All Software / Absolute Order / Season 1 / Episode 108

Variables in Routes

We extend our simple request router to allow variables in the routes, like the variable "username" in "/users/:username". It extracts the variables' values from the requested path and feeds them to the handler block, as in most web frameworks. Regexes are the obvious implementation choice in a language like Ruby. We briefly look at the pitfalls in the regex approach, then implement with a much more straightforward method.

English
  • Originally Aired February 28, 2018
  • Production Code 108
  • Notes Is a season finale
  • Created October 6, 2019 by
    Administrator admin
  • Modified October 6, 2019 by
    Administrator admin