INNER CODE UNIT · Go

func

resgateio/resgate · server/apiEncoding.go:291

func (e *encoderJSONFlat) ContentType() string {
	return "application/json; charset=utf-8"
}

func (e *encoderJSONFlat) EncodeGET(s *Subscription) ([]byte, error) {
	// Clone encoder for concurrency safety
	ec := encoderJSONFlat{
		apiPath:       e.apiPath,
		notFoundBytes: e.notFoundBytes,
	}

	err := ec.encodeSubscription(s)
	if err != nil {
		return nil, err
	}
	return json.RawMessage(ec.b.Bytes()), nil
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…