-1

I have always worked with simple parameters and I don't know how to proceed in this case:

[HttpPost] 
public HttpResponseMessage RemoveItems(int docId, int[] itemIds)
{
    ...
}

Anyone can tell me a guide, article, material from which to take inspiration?

Sankar
  • 6,579
  • 2
  • 26
  • 47
user3669577
  • 19
  • 1
  • 4

1 Answers1

0

You just need to add [FromUri] before the parameter. It looks like:

GetitemIds([FromUri] int[] itemIds)

And send a request like:

/itemIds?itemids[0]=1&itemids[1]=2.....

Lauren Rutledge
  • 1,145
  • 5
  • 20
  • 27
Aftab Lala
  • 95
  • 5