MCPcopy Create free account
hub / github.com/goadesign/goa / GetBody

Method GetBody

http/encoding.go:218–223  ·  view source on GitHub ↗

GetBody returns a new reader of the encoded bytes, enabling request retries. This is required for HTTP/2 connections to handle server GOAWAY during graceful shutdown.

()

Source from the content-addressed store, hash-verified

216// GetBody returns a new reader of the encoded bytes, enabling request retries.
217// This is required for HTTP/2 connections to handle server GOAWAY during graceful shutdown.
218func (je *jsonEncoder) GetBody() (io.ReadCloser, error) {
219 if len(je.b) == 0 {
220 return nil, errEncodeNotCalled
221 }
222 return io.NopCloser(bytes.NewReader(je.b)), nil
223}
224
225// ResponseDecoder returns a HTTP response decoder.
226// The decoder handles the following content types:

Callers 1

Calls

no outgoing calls

Tested by 1