Topic: core/batch - Invaid input
I'm using core/batch with .Net Framework, getting error "Invaid input" if I use special character "&" in any batch input.
Currently using StringContent Method, Encoding type as " Encoding.UTF8", Mediatype as "application/x-www-form-urlencoded"
Kindly give any suggestion. Thanks in advance.
Code :
var mainParam = new StringBuilder();
mainParam.Append("svc=").Append("core/batch");
mainParam.Append("¶ms=").Append(mainParamsString);
mainParam.Append("&sid=").Append(sessionID);
var content = new StringContent(Uri.EscapeUriString(mainParam.ToString()), Encoding.UTF8, "application/x-www-form-urlencoded");
var response = client.PostAsync(Constants.RequestUri, content).Result;
J Prabhu