是否可以使用Postman Chrome扩展发送数组? [英] Is it possible to send an array with the Postman Chrome extension?
问题描述
我一直在使用Postman Chrome扩展程序来测试我的API,并希望通过发布发送ID数组。有没有办法将邮件列表作为邮递员的参数?
{
user_ids:[1234 ,5678]
}
您需要用 []
后缀变量名称,如下所示:
如果这不起作用,请不要将索引放在括号中:
my_array [] value1
my_array [] value2
注意: 0.8.4.6
时,至少发现了错误)。
I've been using Postman Chrome extension to test out my API and would like to send an array of IDs via post. Is there a way to send something list this as a parameter in Postman?
{
user_ids: ["1234", "5678"]
}
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
).
这篇关于是否可以使用Postman Chrome扩展发送数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!