gin/render
chriswhelix 97d310b55c Honor normal gin write contract for context.JSON()
Gin normally silently swallows errors writing to the client; however in WriteJSON (and thus context.JSON), the ResponseWriter was being passed directly into the JSON encoder, which will return an error if there's an error writing to the stream. For instance, context.JSON would panic with errors like "write tcp XXX-> YYY: write: connection reset by peer" if the client disconnected before the response was complete. This change makes JSON.Render() treat write errors the same as IndentedJSON, Data, and other renderers.
2016-12-11 10:14:23 +08:00
..
data.go Using Render() instead of Write() 2015-06-04 05:25:21 +02:00
html.go lint code 2016-04-15 01:16:46 +02:00
json.go Honor normal gin write contract for context.JSON() 2016-12-11 10:14:23 +08:00
redirect.go c.Redirect() allows 201 status code 2016-01-28 00:34:05 +01:00
render_test.go Using Render() instead of Write() 2015-06-04 05:25:21 +02:00
render.go closes #514, code from bobbo@b4f0b50 2016-04-14 23:47:49 +02:00
text.go Adds supports for custom JSON Content-type 2015-06-13 04:29:10 +02:00
xml.go Add support for custom HTML and XML content-type 2015-06-13 04:43:23 +02:00
yaml.go closes #514, code from bobbo@b4f0b50 2016-04-14 23:47:49 +02:00