MCPcopy
hub / github.com/connectrpc/connect-go / writeGRPCWeb

Method writeGRPCWeb

error_writer.go:173–179  ·  view source on GitHub ↗
(response http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

171}
172
173func (w *ErrorWriter) writeGRPCWeb(response http.ResponseWriter, err error) error {
174 // This is a trailers-only response. To match the behavior of Envoy and
175 // protocol_grpc.go, put the trailers in the HTTP headers.
176 grpcErrorToTrailer(response.Header(), w.protobuf, err)
177 response.WriteHeader(http.StatusOK)
178 return nil
179}

Callers 1

WriteMethod · 0.95

Calls 3

grpcErrorToTrailerFunction · 0.85
HeaderMethod · 0.65
WriteHeaderMethod · 0.45

Tested by

no test coverage detected