Uh oh!
There was an error while loading. Please reload this page.
fix(http): serialize nested objects in form-urlencoded body - #3124
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryFixed Changes:
The fix addresses issue #3109 and includes test coverage that was requested in previous review feedback. Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant requestTool
participant URLSearchParams
participant fetch
Client->>requestTool: POST with nested body & form-urlencoded header
Note over Client,requestTool: body: {name: 'test', data: {nested: 'value'}, items: [1,2,3]}
requestTool->>requestTool: Check Content-Type header
alt Content-Type is application/x-www-form-urlencoded
requestTool->>URLSearchParams: new URLSearchParams()
loop For each key-value pair
alt value is object
requestTool->>requestTool: JSON.stringify(value)
Note over requestTool: {nested: 'value'} → '{"nested":"value"}'<br/>[1,2,3] → '[1,2,3]'
else value is primitive
requestTool->>requestTool: String(value)
Note over requestTool: 'test' → 'test'
end
requestTool->>URLSearchParams: append(key, stringified_value)
end
URLSearchParams->>requestTool: URL-encoded string
Note over URLSearchParams: 'name=test&data=%7B%22nested%22%3A%22value%22%7D&items=%5B1%2C2%2C3%5D'
end
requestTool->>fetch: HTTP request with serialized body
fetch-->>requestTool: Response
requestTool-->>Client: Result
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Feb 3, 2026
waleedlatif1
commented
Feb 3, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
[object Object]Fixes#3109
Type of Change
Testing
Tested manually
Checklist