MCPcopy
hub / github.com/openfaas/faas / RoundTrip

Method RoundTrip

gateway/types/proxy_client.go:73–79  ·  view source on GitHub ↗

RoundTrip implements the RoundTripper interface.

(req *http.Request)

Source from the content-addressed store, hash-verified

71
72// RoundTrip implements the RoundTripper interface.
73func (t *proxyTransport) RoundTrip(req *http.Request) (*http.Response, error) {
74 if _, ok := req.Header["User-Agent"]; !ok {
75 req.Header.Set("User-Agent", fmt.Sprintf("openfaas-ce-gateway/%s", version.BuildVersion()))
76 }
77
78 return t.Transport.RoundTrip(req)
79}

Callers 1

NewLogHandlerFuncFunction · 0.80

Calls 2

BuildVersionFunction · 0.92
SetMethod · 0.65

Tested by

no test coverage detected