SearchUsingPost


#1

Hi
IU am trying to use the “SearchUsingPost” feature. What should the signature of the WebApi.

I tried “application/x-www-urlencoded-form”
My api looks like this:
[HttpPost]

    [Route("{type}/_search")]

    [Consumes("application/x-www-form-urlencoded")]
    public IActionResult Search(
       [FromBody]    
       FormDataCollection  myType)

    {  }

However the response is: unaccepted Media Type.

I am using ASP.Net core 2.1.
Please help!


#2

I’m not familiar with ASP.net so I’m not sure, but it looks ok. which server are you submitting to?