User36583972 posted
Hi sudip_inn,
do i need to again specify that i am sending json to action like below way ?
Yes, you need to specify that you are sending JSON data to action.
that i am sending json
Use a StringContent, with the JSON representation of your JSON object
var responseS = httpClient.PostAsync(uri, new StringContent(JsonConvert.SerializeObject(OBJECT), Encoding.UTF8, "application/json"));
or i want json as response ?
You can use the following code to return a JSON data.
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));//JSON
// client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));//XML


Best Regards,
Yohann Lu