MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / decoratePostRequest

Method decoratePostRequest

scope.go:458–471  ·  view source on GitHub ↗
(req *http.Request, origParams, params url.Values)

Source from the content-addressed store, hash-verified

456}
457
458func (s *scope) decoratePostRequest(req *http.Request, origParams, params url.Values) {
459 ct := req.Header.Get("Content-Type")
460 if strings.Contains(ct, "multipart/form-data") {
461 for key := range origParams {
462 if externalDataParams.MatchString(key) {
463 params.Set(key, origParams.Get(key))
464 }
465 }
466
467 // disable cache for external_data queries
468 origParams.Set("no_cache", "1")
469 log.Debugf("external data params detected - cache will be disabled")
470 }
471}
472
473func (s *scope) getTimeoutWithErrMsg() (time.Duration, error) {
474 var (

Callers 1

decorateRequestMethod · 0.95

Calls 3

DebugfFunction · 0.92
ContainsMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected