Following is my get method in ASP.NET Web API.
[HttpGet]
public IHttpActionResult GetDetails([FromBody] RetrieveDetails eDetails)
{}
following is the class
public class RetrieveDetails
{
public string name{ get; set; }
public string Type { get; set; }
}
When I try to call GetDetails
from Fiddler eDetails
is always null.
http://localhost:101222/api/emailservice/GetDetails?name=testname&Type=testtype
I tried different methods but the value is always null. If I change [HttpGet] to [HttpPost] and add the request body its working fine. But I need get method.