MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / WithOutgoingHeaderMatcher

Function WithOutgoingHeaderMatcher

runtime/mux.go:208–212  ·  view source on GitHub ↗

WithOutgoingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway. This matcher will be called with each header in response header metadata. If matcher returns true, that header will be passed to http response returned from gateway. To transform the

(fn HeaderMatcherFunc)

Source from the content-addressed store, hash-verified

206// passed to http response returned from gateway. To transform the header before passing to response,
207// matcher should return the modified header.
208func WithOutgoingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
209 return func(mux *ServeMux) {
210 mux.outgoingHeaderMatcher = fn
211 }
212}
213
214// WithOutgoingTrailerMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
215//

Calls

no outgoing calls