chi/render
2017-03-30 14:41:17 -04:00
..
content_type.go Update README, CHANGELOG, other comments 2017-03-30 14:41:17 -04:00
decoder.go Rewrite of chi/render pkg, introducing Binder and Renderer interfaces for handling well-defined request/response payloads 2017-03-30 14:41:17 -04:00
README.md Update README, CHANGELOG, other comments 2017-03-30 14:41:17 -04:00
render.go Update README, CHANGELOG, other comments 2017-03-30 14:41:17 -04:00
responder.go Update versions example to use latest render subpkg 2017-03-30 14:41:17 -04:00

chi/render

The render sub-package helps manage HTTP request / response payloads.

Every a well-designed, robust and maintainable Web Service / REST API also needs well-defined request and response payloads.

Typically in a REST API application, you will have your data models (objects/structs) that hold lower-level runtime application state, and at times you need to assemble, decorate, hide or transform the representation before responding to a client, and also the client will likely provide the same structure as input from its requests.

This is where render comes in - offering a few simple helpers and interfaces to provide a simple pattern for managing payload encoding and decoding.

We've also combined it with some helpers for responding to content types and parsing request bodies. Please have a look at the rest example which uses the latest chi/render sub-pkg.

All feedback is welcome, thank you!