Destroy All Software

Destroy All Software

Variables in Routes (8x2)

Ultimo episodio della stagione

Data di messa in onda: Feb 28, 2018

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.

  • Posizione #
  • Iniziato: Giu 2017
  • Episodi: 9
  • Followers: 0
  • Terminata
  • Sconosciuto
  • Sconosciuto