title: ASP .NET Webhook Receiver
body: <p>I am trying to create a web app that will receive HTTP Posts containing json. All I want to do for now is show that I can receive the requests. I started by creating an ASP .NET web app with Web API template. I added a controller to receive the posts:</p>
  
  <pre><code>  public class PostmanController : Controller
  {
  
      [System.Web.Mvc.HttpPost]
      public void Index([FromBody] string request)
      {
  
          // Create handler class object
          PostmanHandler test = new PostmanHandler();
  
          // Pass request to the convertjsontoobject method
          test.ConvertJsonToObject(request);
  
      }
  }
  </code></pre>
  
  <p>As you can see here, I also created a handler in the Models folder:</p>
  
  <pre><code>public class PostmanHandler
  {
   public void ConvertJsonToObject(string s)
      {
          // Deserialize JSON
          var newData = JsonConvert.DeserializeObject&lt;testobject&gt;(s);
      }
  }
  </code></pre>
  
  <p>Which converts the JSON into a class I made:</p>
  
  <pre><code>public class testobject
  {
      public int id { get; set; }
      public string name { get; set; }
  }
  </code></pre>
  
  <p>I am trying to test this out to see if it works but I get a 404 response from Postman when I send a POST request. I am sending it to <a href="http://localhost:xxxx/api/Postman" rel="nofollow noreferrer">http://localhost:xxxx/api/Postman</a> which I thought follows the routing in the WebApiConfig file that states: routeTemplate: "api/{controller}/{id}"</p>
  
  <p>Am I leaving out some sort of routing? </p>