Request Lifecycle
Requests in the Angel framework go through a relatively complex lifecycle, and to truly master the framework, one must understand that lifecycle.
startServeris called.Each
HttpRequestis sent throughhandleRequest.beforeProcessedis fired with theHttpRequest.handleRequestconverts theHttpRequestto aRequestContext, and converts itsHttpResponseinto aResponseContext.angel_routeis used to match the request path to a list of request handlers.beforeandafterare combined with the handler list.Each handler is executed.
afterProcessedis fired with theHttpRequest.All
responseFinalizersare run, ifres.willCloseItself != true.If
res.willCloseItself = false, all headers, the status code and the response buffer are sent through the actualHttpResponse.The
HttpResponseis closed.
If at any point an error occurs, Angel will catch it. See the error handling docs for more.
Last updated