Request.the post how to disable serialization of objects the query string?

itemlist is an array of strings;
Send that way but the data on the receiving side when deserialization I do not get the items array, the variable set "items[1]" "items[2]" items[3]" and so, how to fix it?
although in another project, everything works fine
let data = { server: this.gameData.winner.steamid, items: itemlist };
request.post(
'http://localhost:4000/senditems',
 { form: {data:data} },
 function (error, response, _body) {
 if (!error && response.statusCode == 200) {
}
 });
June 27th 19 at 14:58
1 answer
June 27th 19 at 15:00
Send json if the receiving party is you, take it apart no problem.
Update
And all request should alter your worm a date into a string steamid=111&items=1&items=2 and in fact if you have the right to accept such data, this is not a problem.
well, I just use POST to pass json data as simple json and not processed in it is not clear that - valerie73 commented on June 27th 19 at 15:03
: no you're not passing json
1. form -> body
2. Add json: true
3. In headers:
'Content-Type': 'application/json' - sally_Carro commented on June 27th 19 at 15:06

Find more questions by tags Express.jsNode.jsWeb Development