I get always null value from body why ? I have no problem with using fiddler but postman is fail.
I have a web api like that:
[Route(\"api/account/Ge
You are posting an object and trying to bind it to a string. Instead, create a type to represent that data:
public class Credentials
{
public string Username { get; set; }
public string Password { get; set; }
}
[Route("api/account/GetToken/")]
[System.Web.Http.HttpPost]
public HttpResponseBody GetToken([FromBody] Credentials value)
{
string result = value.Username;
}