When I add ContentType header to request it becomes null instead of application/json. I can see it in the debugger. Here is the code
RestClient client = new RestClient(url);client.Timeout = -1;RestRequest request = new RestRequest(Method.POST);request.AddHeader("Authorization", "Bearer " + token);request.AddHeader("Content-Type", "application/json");request.AddParameter("application/json", requestBody, ParameterType.RequestBody);IRestResponse<T> response = await client.ExecuteAsync<T>(request);
Any suggestions ? Thanks in advance
I tried changing the "Content-Type" to "ContentType" but that doesn't work