Description

Use EncodeJson to generate the payload, write the headers with http.StatusOK if they are not already written, then write the payload. The Content-Type header is set to "application/json", unless already specified.