Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 780 Bytes

motivation.md

File metadata and controls

15 lines (12 loc) · 780 Bytes

Motivation

Why yet another HTTP toolkit? We already have express, koa, micro, and node http, but all of them apply a side-effect handling model, say, user handles the request by manipulating the response object. This is neither intuitive nor convenient, because it doesn't match the http request-response (RR) handling model, which is just a simple function:

async (request) => response

By applying such a model, handling http request becomes straight forward. Extending the handler also becomes simple and easy, with no magic, by just composing wrappers, as what recompose do to React.