Request Lifecycle
Requests in the Angel3 framework go through a relatively complex lifecycle, and to truly master the framework, one must understand that lifecycle.
startServer
is called.Each
HttpRequest
is sent throughhandleRequest
.handleRequest
converts theHttpRequest
to aRequestContext
, and converts itsHttpResponse
into aResponseContext
.angel3_route
is used to match the request path to a list of request handlers.Each handler is executed.
If the response is using streaming, and not buffering content, skip to step 8 (default).
All
responseFinalizers
are run.If
res.isDetached == false
, all headers, the status code and the response buffer are sent through the actualHttpResponse
.The
HttpResponse
is closed.
If at any point an error occurs, Angel3 will catch it. See the error handling docs for more.
Next Up
Continue reading to learn about Dependency Injection.
Last updated