| 93 | binding: binding, |
| 94 | toolDescription: toolDescription, |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | func (n *WebFetch) Outputs() map[string]workflowapi.DataType { |
| 99 | return engine.FilterEmitted( |
| 100 | map[string]workflowapi.DataType{webFetchOutID: workflowapi.String}, |
| 101 | map[string]workflowapi.OutputBinding{webFetchOutID: n.binding}, |
| 102 | ) |
| 103 | } |
| 104 | |
| 105 | func (n *WebFetch) Execute(ctx context.Context, scope *engine.Scope) (string, error) { |
| 106 | if n.url == nil { |
| 107 | return "", fmt.Errorf("web_fetch %s: no url expression", n.ID()) |
| 108 | } |
| 109 | urlStr, err := expr.EvalString(*n.url, scope) |
| 110 | if err != nil { |
| 111 | return "", fmt.Errorf("web_fetch %s: url: %w", n.ID(), err) |