8

I am trying to send an array of the object as a form-data using postman. But it's not working. I follow this link in StackOverflow...But it's worked for mt.

enter image description here

When I send my category like this it's sent like this:- Category returns null property. enter image description here

This should be like this. I got this screenshot when I was passing data application/JSON. enter image description here

But now I need to send an image with my req, I need to send my req as a form/data. But My Category object array is not passing the way I want, Or the way my system wants. I really need your help. Thank you.

Zenixo
  • 727
  • 1
  • 12
  • 36

3 Answers3

10

Found Solutions by myself. You can send the request like this.

enter image description here.

Zenixo
  • 727
  • 1
  • 12
  • 36
0

Without the array index also work enter image description here

Maged Makled
  • 1,918
  • 22
  • 25
0

You can easily send an array or array of objects as form-data in postman, using this approach.

  1. Add normal key-value pair as shown, make sure the array is in it's raw format. A key value pair of an array

  2. On the server use this method to receive the array. enter image description here

This should work!!

  • Please do not post [images of code](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors). – Jan Vítek Jun 08 '23 at 06:45