fix(tools): support stringified HTTP request tables#3565
fix(tools): support stringified HTTP request tables#3565PlaneInABottle wants to merge 3 commits intosimstudioai:stagingfrom
Conversation
Accept stored header and query tables after they are reloaded from UI JSON so HTTP requests keep their query strings and URL-encoded body handling intact.
PR SummaryMedium Risk Overview Updates request typing and Written by Cursor Bugbot for commit af48016. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes a serialization mismatch where the UI persists HTTP request Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["RequestParams\nparams / headers: TableRow[] or string"] --> B["processUrl(url, pathParams, queryParams)"]
A --> C["transformTable(headers)"]
B --> D{queryParams type?}
D -->|string| E[JSON.parse via transformTable]
D -->|"TableRow[]"| F[reduce rows to key/value map]
D -->|"null / undefined"| H[skip - URL unchanged]
E --> I{parsed result?}
I -->|array| F
I -->|plain object| G[return as-is]
I -->|invalid JSON| J["return {} - silent fallback"]
F --> K[encode & append query string to URL]
G --> K
C --> M{headers type?}
M -->|string| N[JSON.parse via transformTable]
M -->|"TableRow[]"| O[reduce rows to key/value map]
N --> P[getDefaultHeaders - merge + set Host]
O --> P
P --> Q[Return final headers map]
Last reviewed commit: af48016 |
|
@cursor review |
|
@greptile |
Summary
paramsandheadersso serialized table data from the UI is handled correctly