问题
I have a data that looks like this:

I took a look at this post Array value on postman chrome extension, so I know how to use postman to send post request with parameters from age
to skillset
, my problem is the work_experience
, it's an array of hashes, I want to input the work_experience
in postman, from which you can see is an array of hashes.
So is this possible? And if you know a better chrome extension that can do this, feel free to answer or comment
P.S.
Although this is should be obvious, but for the sake of the person who voted to close this for being unclear, my purpose is to simulate what my mobile ios app would send to my server's api without actually using the ios app to type on every textfield every time I run the app.
回答1:
You can put nested sub-keys in brackets. So you could define some of your key/value pairs in the form-data fields like this:
key: work_experience[0][company_name]
value: asdfdfaf
key: work_experience[0][end_date]
value: 12/21/2121
key: work_experience[1][company_name]
value: fdjfkjdfjk
key: work_experience[1][end_date]
value: 1/3/15
回答2:
You can try you sending it as a "raw" data" (and not a form-data or form-urlencoded)
回答3:
U can also try as below... its worked for me
key: work_experience[0].company_name value: asdfdfaf
key: work_experience[0].end_date value: 12/21/2121
key: work_experience[1].company_name value: fdjfkjdfjk
key: work_experience[1][end_date] value: 1/3/15
来源:https://stackoverflow.com/questions/24239042/postman-chrome-extension-with-array-of-hashes-as-value