content type application/json csharp

Code Example - content type application/json csharp

                
                        var url = new Uri("");  // url to make post request to
var json = "";  // json to post

// create string content with MediaTypeHeaderValue
var stringContent = new StringContent(partialSnackerJson)
{
  Headers =
  {
    ContentType = new MediaTypeHeaderValue("application/json")
   }
};

// make http request
var response = await client.PostAsync(url, stringContent);