Skip to content
Myr

Fixed Content-Type for json render. Thank you @mdigger

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Manu Mtz-Almeida · committed by Manu Mtz-Almeida · parent 5ea7a92 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:render/render.go+1 added-1 removed
40 unmodified lines
41 }42}4344func (_ jsonRender) Render(w http.ResponseWriter, code int, data ...interface{}) error {45 writeHeader(w, code, "application/xml")45 writeHeader(w, code, "application/json")46 encoder := json.NewEncoder(w)47 return encoder.Encode(data[0])48}49
20 unmodified lines