feat(executor): expose ctx.request.method to scripts (F4)
The request map exposed path/headers/body/params/query/rest but not the HTTP method, forcing one script per verb (the E2E app needed 7 scripts where ~3 would do). Add a `method` field to ExecRequest (populated from the HTTP method on the sync-execute bypass and the HTTP outbox payload; empty for non-HTTP triggers) and surface it as `ctx.request.method`, uppercased. A single script can now branch GET/POST on one route. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -584,6 +584,8 @@ fn build_exec_request(
|
||||
script_name: name.to_string(),
|
||||
invocation_type: InvocationType::Http,
|
||||
path: format!("/api/execute/{id}"),
|
||||
// The `/api/v1/execute/{id}` bypass is POST-only.
|
||||
method: "POST".into(),
|
||||
headers: hmap,
|
||||
body: body_json,
|
||||
params: BTreeMap::new(),
|
||||
|
||||
Reference in New Issue
Block a user