I have a question about the requests library in Python.
I tried to send this to my nodeJS server:
payload={
"sid": _set["_id"],
"pid": _project["_id"],
"inputs": [_file["_id"]]
}
print(payload)
response = requests.post(URLPORT+"/job/",headers={'Authorization': token},data=payload)
_job=response.json()
print(_job)
But what was recived is this (console.log(req.body)):
{ sid: '5a8862e8514580739235c0ab',
pid: '5a9be32fdacc495d6a2ea8bf',
inputs: '5a9be342dacc495d6a2ea8c0' }
If I send *"inputs": [_file["_id"],-1]*
I get *inputs: [ '5a9be342dacc495d6a2ea8c0', '-1' ] }*
Where are this both guys **[** and **]**
, if I send only one element?
Thanks