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

Function Put

pkg/httpcli/httpcli.go:391–395  ·  view source on GitHub ↗

Put request, return custom json format

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

Source from the content-addressed store, hash-verified

389
390// Put request, return custom json format
391func Put(result interface{}, urlStr string, body interface{}, opts ...Option) error {
392 o := defaultOptions()
393 o.apply(opts...)
394 return do("PUT", result, urlStr, body, o.params, o.headers, o.timeout)
395}
396
397// Patch request, return custom json format
398func Patch(result interface{}, urlStr string, body interface{}, opts ...Option) error {

Callers 4

TestRequestFunction · 0.92
TestPutFunction · 0.85

Calls 3

defaultOptionsFunction · 0.70
doFunction · 0.70
applyMethod · 0.65

Tested by 4

TestRequestFunction · 0.74
TestPutFunction · 0.68