INNER CODE UNIT · Go
func
resgateio/resgate · server/apiEncoding.go:145
func (e *encoderJSON) ContentType() string {
return "application/json; charset=utf-8"
}
func (e *encoderJSON) EncodeGET(s *Subscription) ([]byte, error) {
// Clone encoder for concurrency safety
ec := encoderJSON{
apiPath: e.apiPath,
notFoundBytes: e.notFoundBytes,
}
err := ec.encodeSubscription(s, false)
if err != nil {
return nil, err
}
return json.RawMessage(ec.b.Bytes()), nil
}