README.md
1# render
2
3The `render` package helps manage HTTP request / response payloads.
4
5Every well-designed, robust and maintainable Web Service / REST API also needs
6well-*defined* request and response payloads. Together with the endpoint handlers,
7the request and response payloads make up the contract between your server and the
8clients calling on it.
9
10Typically in a REST API application, you will have your data models (objects/structs)
11that hold lower-level runtime application state, and at times you need to assemble,
12decorate, hide or transform the representation before responding to a client. That
13server output (response payload) structure, is also likely the input structure to
14another handler on the server.
15
16This is where `render` comes in - offering a few simple helpers and interfaces to
17provide a simple pattern for managing payload encoding and decoding.
18
19We've also combined it with some helpers for responding to content types and parsing
20request bodies. Please have a look at the [rest](https://github.com/go-chi/chi/blob/master/_examples/rest/main.go)
21example which uses the latest chi/render sub-pkg.
22
23All feedback is welcome, thank you!
24
25