Closed JK-de closed 6 years ago
Instead of:
def _httpHandlerTestGet(httpClient, httpResponse): pass routeHandlers = [( "/test", "GET", _httpHandlerTestGet)] MicroWebSrv(routeHandlers=routeHandlers)
You can use the decorator before the handler function:
@MicroWebSrv.route('/test') def _httpHandlerTestGet(httpClient, httpResponse): pass MicroWebSrv()
Additional you can also use the 'old' way
Thank you Jochen Krapf, I've merged your decorator system for the routes :) It's cool !
Instead of:
You can use the decorator before the handler function:
Additional you can also use the 'old' way