When I try to set language when creating a profile, I get a response saying "request body is missing".
The only way I can get it to work is if I specify all of the navigator settings which I'd like to avoid. I contacted support and was told to try creating a JSON object and adding it to my request body but that gives me the same response. Anyone know how I can fix this?
The only way I can get it to work is if I specify all of the navigator settings which I'd like to avoid. I contacted support and was told to try creating a JSON object and adding it to my request body but that gives me the same response. Anyone know how I can fix this?
Code:
var restClientCreate = new RestClient(mlaCreateURL);
var requestCreate = new RestRequest(Method.POST);
dynamic jsonObject = new JObject();
jsonObject.Name = "language";
jsonObject.Value = "en-US,en;q=0.8";
String jsonRequestString = "{\"name\": \"TESTJSON\", \"browser\": \"mimic\", \"os\": \"win\", \"network\": { \"proxy\": { \"type\": \"HTTP\", \"host\": \"" + proxi + "\", \"port\": \"" + proxiport + "\", \"username\": \"" + proxyUsername + "\", \"password\": \"" + proxyPassword + "\"}, \"dns\": null }}" + jsonObject;
requestCreate.AddHeader("Content-Type", "application/json");
requestCreate.AddParameter("application/json", jsonRequestString, ParameterType.RequestBody);
var response = restClientCreate.Execute(requestCreate);