You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does work and will do a visit to /somewhere?name=bob&prefs[color]=red&prefs[food]=apple
Unfortunately the TypeScript definitions do not allow the nested object so we're forced to @ts-ignore it or deal with
TS2322: Type '{ color: string; food: string; }' is not assignable to type 'FormDataConvertible'. Type '{ color: string; food: string; }' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more.
The text was updated successfully, but these errors were encountered:
Results in /somewhere?arr[][test]=1&arr[][test2]=2 which in PHP will result in [ 'arr' => [ ['test' => 1], ['test2' => 2] ] ] instead of [ 'arr' => [ ['test' => 1, 'test2' => 2] ] ]
and as @jjorissen52 pointed out if I force formData in a get request the parameters are not added to the URL
The only workaround is to use objects but this makes it a nasty workaround as arr: {0:{test: 1, test2: 2}} is serialized properly
Take the following request
This does work and will do a visit to
/somewhere?name=bob&prefs[color]=red&prefs[food]=apple
Unfortunately the TypeScript definitions do not allow the nested object so we're forced to @ts-ignore it or deal with
The text was updated successfully, but these errors were encountered: