MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / Patch

Function Patch

pkg/httpcli/httpcli.go:398–402  ·  view source on GitHub ↗

Patch request, return custom json format

(result interface{}, urlStr string, body interface{}, opts ...Option)

Source from the content-addressed store, hash-verified

396
397// Patch request, return custom json format
398func Patch(result interface{}, urlStr string, body interface{}, opts ...Option) error {
399 o := defaultOptions()
400 o.apply(opts...)
401 return do("PATCH", result, urlStr, body, o.params, o.headers, o.timeout)
402}
403
404var requestErr = func(err error) error { return fmt.Errorf("request error, err=%v", err) }
405var jsonParseErr = func(err error) error { return fmt.Errorf("json parsing error, err=%v", err) }

Callers 2

TestRequestFunction · 0.92
TestPatchFunction · 0.85

Calls 3

defaultOptionsFunction · 0.70
doFunction · 0.70
applyMethod · 0.65

Tested by 2

TestRequestFunction · 0.74
TestPatchFunction · 0.68