3 ms·
After reading Steve Klabnik's "Nobody Understands REST or HTTP" ( http://blog.steveklabnik.com/posts/2011-07-03-nobody-understands-rest-or-http http://blog.stev
by cellularmitosis 15y ago
After reading Steve Klabnik's "Nobody Understands REST or HTTP" ( http://blog.steveklabnik.com/posts/2011-07-03-nobody-understands-rest-or-http http://blog.steveklabnik.com/posts/2011-07-03-nobody-underst... ), I thought it would be helpful if honoring the client's Accept: header in GET requests were easier.
Recently I watched Richard Jones' survey of the various Python micro web-frameworks ( http://www.youtube.com/watch?v=AYjPIMe0BhA http://www.youtube.com/watch?v=AYjPIMe0BhA ), and I was really taken by the design of itty.py.
I thought it would be great to extend their idea of the @get decorator for use with Accept:. It turned out to be merely a ~50 line change! Fun! Kudos to the developer of itty.py for writing code which is hack friendly.