title: POST Request using .Net Core 3.1 and HTTP Request of Power Automate
body: <p>I'm having a problem is sending a parameter on a post request from Power Automate using .Net Core 3.1 MVC. I created a simple person application that has parameters Name and Age, then a View has a button that when you click it send a reply to a POST request provided by Power Automate HTTP Request and I will receive an email with the Name and Age that I set to the person model. But every time I received an email it has an empty Name and Age. to provide some details below is my source code:</p>
  <p>Index.cshtml</p>
  <pre><code>&lt;a asp-controller=&quot;Test&quot; asp-action=&quot;SendNameAge&quot; class=&quot;btn btn-success&quot; &gt;Json Trigger&lt;/a&gt;
  </code></pre>
  <p>Success.cshtml</p>
  <pre><code>&lt;p&gt;success request&lt;/p&gt;
  </code></pre>
  <p>Failed.cshtml</p>
  <pre><code>&lt;p&gt;Failed request&lt;/p&gt;
  </code></pre>
  <p>Model.cs</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  
  namespace WebApplication.Model
  {
      public class Person
      {
          public string Name { get; set; }
          public int Age { get; set; }
      }
  }
  
  </code></pre>
  <p>TestController.cs</p>
  <pre><code>using Microsoft.AspNetCore.Mvc;
  using System;
  using System.Net.Http;
  using System.Threading.Tasks;
  using WebApplication.Model;
  using WebApplication.Utility;
  
  namespace WebApplication.Controllers
  {
      public class TestController : Controller
      {
          public IActionResult Index()
          {
              return View();
          }
  
          public IActionResult Success()
          {
              return View();
          }
  
          public IActionResult Failed()
          {
              return View();
          }
  
          public async Task&lt;IActionResult&gt; SendNameAge()
          {
              using (var client = new HttpClient())
              {
                  Person person = new Person
                  {
                      Name = &quot;Juan Dela Cruz&quot;,
                      Age = 32
                  };
  
                  client.BaseAddress = new Uri(SD.ApiUri);
                  var response = await client.PostAsJsonAsync(SD.ApiUri, person);
  
                  if (response.IsSuccessStatusCode)
                  {
                      return RedirectToAction(nameof(Success), Json(response));
                  }
                  else
                  {
                      return RedirectToAction(nameof(Failed), Json(response));
                  }
              }
          }
      }
  }
  </code></pre>
  <p>then here is the email I receive when I click the button, and also the email I should receive with parameters but I just use a Postman for testing.</p>
  <p><strong>Email From .Net Core</strong>
  <a href="https://i.stack.imgur.com/csdG8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/csdG8.png" alt="Email receive from .Net Core" /></a></p>
  <p><strong>Email using Postman</strong>
  <a href="https://i.stack.imgur.com/WLQMp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WLQMp.png" alt="Email receive using Postman" /></a></p>