title: .Net Core WebAPI , Unable to post data with POSTMAN , error - 415 Unsupported MediaType
body: <p>I am testing my first .net Core WebAPI with Postman</p>
  
  <blockquote>
    <p>unknown media type error is occurring.</p>
  </blockquote>
  
  <p>What am I missing?</p>
  
  <p><a href="https://i.stack.imgur.com/PkkwE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PkkwE.png" alt="This is postman rest client"></a></p>
  
  <p>This is my posting object</p>
  
  <pre><code>public class Country
  {
      [Key]
      public int CountryID { get; set; }
      public string CountryName { get; set; }
      public string CountryShortName { get; set; }
      public string Description { get; set; }
  }
  </code></pre>
  
  <p>This is the webapi controller</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;IActionResult&gt; PostCountry([FromBody] Country country)
  {
      if (!ModelState.IsValid)
      {
          return BadRequest(ModelState);
      }
  
      _context.Country.Add(country);
      try
      {
          await _context.SaveChangesAsync();
      }
      catch (DbUpdateException)
      {
          if (CountryExists(country.CountryID))
          {
              return new StatusCodeResult(StatusCodes.Status409Conflict);
          }
          else
          {
              throw;
          }
      }
  
      return CreatedAtAction("GetCountry", new { id = country.CountryID }, country);
  }
  </code></pre>