MCPcopy Create free account
hub / github.com/UiPath/uipathcli / serializeJson

Method serializeJson

executor/http_executor.go:94–108  ·  view source on GitHub ↗
(body io.Writer, parameters []ExecutionParameter)

Source from the content-addressed store, hash-verified

92}
93
94func (e HttpExecutor) serializeJson(body io.Writer, parameters []ExecutionParameter) error {
95 data := map[string]interface{}{}
96 for _, parameter := range parameters {
97 data[parameter.Name] = parameter.Value
98 }
99 result, err := json.Marshal(data)
100 if err != nil {
101 return fmt.Errorf("Error creating body: %w", err)
102 }
103 _, err = body.Write(result)
104 if err != nil {
105 return fmt.Errorf("Error writing body: %w", err)
106 }
107 return nil
108}
109
110func (e HttpExecutor) validateUri(uri string) (*url.URL, error) {
111 if strings.Contains(uri, "{organization}") {

Callers 1

writeJsonBodyMethod · 0.95

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected