MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / Put

Method Put

cli/pkg/common/http.go:91–110  ·  view source on GitHub ↗
(reqUrl string,
	reqParams map[string]interface{}, headers map[string]string)

Source from the content-addressed store, hash-verified

89}
90
91func (target HttpClient) Put(reqUrl string,
92 reqParams map[string]interface{}, headers map[string]string) (string, error) {
93
94 result := ""
95 var err error = nil
96
97 Retry(target.RetryMax, target.Sleep, func() error {
98 result, err = target.put(reqUrl, reqParams, headers)
99 if err == nil {
100 if result == "" {
101 err = errors.New("response body is empty")
102 } else if !IsJSON(result) {
103 err = errors.New("response body is not json")
104 }
105 }
106 return err
107 })
108
109 return result, err
110}
111
112func (target HttpClient) PostJson(reqUrl string,
113 reqParams map[string]interface{}, headers map[string]string) (string, error) {

Callers 5

UpdateWsLogFunction · 0.80
FeeadbackExtendFunction · 0.80
Trigger_ActionFunction · 0.80
UpdateResourceByIDFunction · 0.80
FeeadbackContainerIdFunction · 0.80

Calls 3

putMethod · 0.95
RetryFunction · 0.85
IsJSONFunction · 0.85

Tested by

no test coverage detected