6
Answers

unsupported media type using GET method in httpclient c#

Photo of Shefali Lahariya

Shefali Lahariya

7y
10k
1
using code
 
 
string url = "http://localhost:8080/XYZ/API/JCR/ShowAllGroups" + "/" + jioMeetConstant.Uid + "/" + jioMeetConstant.KEY;
var client = new System.Net.Http.HttpClient();
///Adding OAuth token
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", jioMeetConstant.Accesstoken);
HttpResponseMessage aResp = await client.GetAsync(url);
 

Answers (6)