Within the context interface in the Echo framework, there is a method called Bind, which will perform request payload binding. The following is the definition of the function:
// Bind binds the request body into provided type `i`. The default binder // does it based on Content-Type header. Bind(i interface{}) error
In essence, the Context.Bind function takes the payload and Content-Type header from the HTTP request, and converts it into any structure defined by the passed in i interface{} function parameter. This is a very handy feature of the web application framework as it removes a lot of the coding required by the developer to interpret the request payload themselves. Instead of having to perform deserialization of the HTTP request body yourself, Echo will perform this for you. The following is an example handler that uses the Bind function call...