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

Method Get

cli/pkg/common/http.go:71–89  ·  view source on GitHub ↗
(reqUrl string,
	reqParams map[string]string, headers map[string]string)

Source from the content-addressed store, hash-verified

69}
70
71func (target HttpClient) Get(reqUrl string,
72 reqParams map[string]string, headers map[string]string) (string, error) {
73 result := ""
74 var err error = nil
75
76 Retry(target.RetryMax, target.Sleep, func() error {
77 result, err = target.get(reqUrl, reqParams, headers)
78 if err == nil {
79 if result == "" {
80 err = errors.New("response body is empty")
81 } else if !IsJSON(result) {
82 err = errors.New("response body is not json")
83 }
84 }
85 return err
86 })
87
88 return result, err
89}
90
91func (target HttpClient) Put(reqUrl string,
92 reqParams map[string]interface{}, headers map[string]string) (string, error) {

Callers 13

GetWSPoliciesFunction · 0.45
GetServerWorkspaceListFunction · 0.45
GetWorkspaceFromServerFunction · 0.45
GetParentIdFunction · 0.45
GetWorkspaceNoFunction · 0.45
isHostExistInConfigFunction · 0.45
GetVersionByApiFunction · 0.45
update.goFile · 0.45
GetResourceByIDFunction · 0.45
waitingAndOpenBrowerFunction · 0.45
ExecuteVmStartCmdFunction · 0.45

Calls 3

getMethod · 0.95
RetryFunction · 0.85
IsJSONFunction · 0.85

Tested by

no test coverage detected