app: rework weblite's support for JSON POSTs and custom routing.