| 92 | } |
| 93 | |
| 94 | func (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 | |
| 110 | func (e HttpExecutor) validateUri(uri string) (*url.URL, error) { |
| 111 | if strings.Contains(uri, "{organization}") { |