Receiving null parameters Httppatch Odata V4

Asked

Viewed 23 times

0

Salve Foks,

I’m having trouble passing values to the controller using the verb Httppath

controller:

    [EnableQuery]
    [HttpPatch]        
    public async Task<Document> Patch(
        [FromODataUri] int key1,
        [FromODataUri] int key2,
        [FromBody] Delta<Document> deltaSales)
    {
      /// logic ...
    }

Request: http://localhost:1146/odata/Document(key1=516820392,Key2=1)

when receiving in controller I am getting zero values.

  • With httpPost it works ?

  • DeltaSales is also passing zero ?

  • yes, with httppost it works, and the delta is also coming zeroed

  • Make sure the data is sent by Httppatch.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.