I am trying to retrieve post body with ASP.NET server but it is not receiving the body.
This is my controller
[HttpPost] public Boolean ReleaseProtection([FromBody]string value) { System.Diagnostics.Debug.WriteLine("returning value"); System.Diagnostics.Debug.WriteLine(value); return true; } This is my client c# script
var credentials = new Dictionary<string, string>() { {"token", Token.Value}, {"repoId", repoId} }; var content = new FormUrlEncodedContent(credentials); var response = await client.PostAsync(Ribbon1.DOTNETHOSTURL + "api/excel/ReleaseProtection", content); var responseString = await response.Content.ReadAsStringAsync(); If I use the same method to post to nodeJS server, it receives message fine but [FormBody] string value returns empty string. Why is this?