Is it possible to send an array with the Postman Chrome extension?
For me did not work with array[0], array1, .. or array[], array[], ... . It works more simply:
You need to suffix your variable name with []
like this:
If that doesn't work, try not putting indexes in brackets:
my_array[] value1
my_array[] value2
Note:
If you are using the postman packaged app, you can send an array by selecting
raw
/json
(instead ofform-data
). Also, make sure to setContent-Type
asapplication/json
inHeaders
tab. Here is example for raw data{"user_ids": ["123" "233"]}
, don't forget the quotes!If you are using the postman REST client you have to use the method I described above because passing data as raw (json) won't work. There is a bug in the postman REST client (At least I get the bug when I use
0.8.4.6
).
Here is my solution:
use form-data and edit as below:
Key Value
box[] a
box[n1] b
box[n2][] c
box[n2][] d
and you will get an array like this:
{"box":{"0":"a","n1":"b","n2":["c","d"]}}