Hacker News new | ask | show | jobs
by jspash 2614 days ago
https://picsum.photos?id=237&w=200&h=300 would be the simplest way to do it. Any url rewriting on top is syntactic sugar.

I'm surprised it hasn't been written this way from the start, with the url rewriting on top. I don't know much about Go but in the "good old days" we would use apache to do the http stuff, including url rewriting, and {insert moudly language here} to just use the params it was given by the web server. It didn't matter if the url was rewritten for aesthetics or it used query string params. You could even run the same script from the command line. Magic!

Nowadays it seems like the front-end languages like to get their hands dirty in the url parsing for better or for worse. Often worse IMO. The application layer should be dealing with business logic, not http transport. Again, this just my (slightly dated) opinion.