Allow custom Content-Type for render.Data
Open
- Dominant language
- Go
- Stars
- 339
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Quite often the response to my API is a file such as an image or pdf. It would be nice to be able to use render.Data and be able to set the Content-Type to something other than application/octet-stream.
To get around this limitation at the moment I use render.JSON or render.XML for sending back JSON or XML data and then fall back to useing http.ResponseWriter.Write for files.
It would be nice not to have to fall back to using the http.ResponseWriter and just use the render.Data to handle files.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.