this is my client code
var client = new HttpClient();
client.BaseAddress = new Uri(BASE_URL);
var multipart = new MultipartFormDataContent();
var jsonToSend = JsonConvert.SerializeObject(template, Formatting.None);
var body = new StringContent(jsonToSend, Encoding.UTF8, "application/json");
multipart.Add(body, "JsonDetails");
return client.PostAsync("jsons", multipart);
server code is
[HttpPost("jsons")]
public async Task<IActionResult> RequestJson([FromBody]Person person)
{
if (person != null)
{
return Ok("true");
}
return Ok("false");
person code
public class Person
{
public string Name { get; set; }
public string Position { get; set; }
}
when look in debug my post from client dont knock to server, in postman my post sending and i can see my object property