Pass data in Json format to restAPI using httpwebrequest C#
I need to pass my json format data to API using httpwebrequest in c#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pradeep SahooRank #489 · 5.1K reputationPosted May 8, 2015, 6:27 AM EDT
httpclient.Headers[HttpRequestHeader.ContentType] = "application/json";
if you are using WebAPI use like
client.PostAsJsonAsync(
Dipankar BiswasRank #992 · 2K reputationPosted May 8, 2015, 6:41 AM EDT
see this link to help..http://stackoverflow.com/questions/5978928/post-json-with-rest-api-using-webreuest-from-wp7