How can i remove the added [] from POST array data?
See original GitHub issueNoticed that this line url/index/serialize function add the []
directly to the array data in the params, but with some backend language like java, it default not support array data with []
but with dulplicate names like:
form data:
//This will not work:
id: 1,
gids[]: 123,
gids[]: 234
//This will work:
id: 1,
gids: 123,
gids: 234
So how about make []
a option to configure just like ng-file-upload using arrayKey: '[i]' or '[]' or '.i' or '' //default is '[i]'
to adapt to different server implementations ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Use data operations in Power Automate (contains video)
Although you can add or remove elements by using the select action, you can't change the number of objects in the array.
Read more >Removing Array Element and Re-Indexing in PHP
In order to remove an element from an array, we can use unset() function which removes the element from an array and then...
Read more >Removing Items from an Array in JavaScript
In this article, we'll explore a few different ways to remove an item from an array in JavaScript. I will also show you...
Read more >How to remove a variable from a PHP session array
I have PHP code that is used to add variables to a session: ... method="post"> <input type="submit" name="remove" value="Remove" /> </form>.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@savokiss , you can use
post
method directly. In the backend server (eg, springMVC) , you can use@RequestBody
, get param info from request bodyafter all, it just avoid your case. It’s hard to see how it could be true
@smallpath does this have option to fix post array without prefix [] ? I also have problem in go.