encode / apistar

The Web API toolkit. 🛠
https://docs.apistar.com
BSD 3-Clause "New" or "Revised" License
5.57k stars 411 forks source link

Route can use event_hook? #620

Closed ZhouBox closed 6 years ago

ZhouBox commented 6 years ago

I used nodejs and express to create restful api. In express , I can set some middleware to a route or app object. But I search apistar docs, I find only set even_hook to app, so now apistar no support set event_hook in designated route?

ZhouBox commented 6 years ago

I can use decorator to set middleware to designated route. But when I use ASyncApp, I get '/docs/',error: File "C:\Users\xxx\AppData\Roaming\Python\Python37\site-packages\apistar\server\staticfiles.py", line 117, in get_response elif self.static_file.file_not_modified(request_headers): AttributeError: 'StaticFile' object has no attribute 'file_not_modified'