ExecuteWithStream mirrors Execute — no incremental output.
(ctx context.Context, args []string, _ func(string))
| 125 | |
| 126 | // ExecuteWithStream mirrors Execute — no incremental output. |
| 127 | func (p *BuiltinHTTPPlugin) ExecuteWithStream(ctx context.Context, args []string, _ func(string)) (string, error) { |
| 128 | if len(args) == 0 { |
| 129 | return "", errors.New(`@http: empty args. Example: <tool_call name="@http" args='{"cmd":"get","args":{"url":"http://localhost:8080/healthz"}}' />`) |
| 130 | } |
| 131 | in, err := parseHTTPInvocation(args) |
| 132 | if err != nil { |
| 133 | return "", fmt.Errorf("@http: %w", err) |
| 134 | } |
| 135 | return p.perform(ctx, in) |
| 136 | } |
| 137 | |
| 138 | // httpArgs is the parsed request specification. |
| 139 | type httpArgs struct { |
no test coverage detected