Chapter 5. Utilizing the Request Context and Data Bindings
As the saying goes, "contextiseverything" and within the Echo framework, everything is accessible through the request context. Context implementation within Echo allows for the simplification of otherwise difficult information passing, as well as state transference through middleware and handlers. Within Echo, we can think of the echo.Context
type as a representation of the request itself and reference its methods in order to retrieve any information about the incoming request.
Along with context, converting the serialized representation of a request payload data into a structure that is usable within an application is of paramount concern for a web application. Echo provides a very helpful capability that will handle the deserialization of the request payload into a structure for use within your handlers. This allows the developer to create custom data structures within the web application, and by using the context.Bind
method, convert...