I'm trying to pass a string with special characters to your web api but is giving error.
Below the line where I pass the values pro web api:
string listaParcelaSeparadoVirgula = null; foreach (var item in listaParcelas) { listaParcelaSeparadoVirgula = listaParcelaSeparadoVirgula + ";;" + item; } var result = HttpUtility.UrlEncode(listaParcelaSeparadoVirgula); var response = client.PostAsJsonAsync("api/LancamentoReceitaDespesa/AddLancamentoParcelar/" + result, lancamentoReceitaDespesa).Result; the result is a string variable with values separated by ";;". Below the contents of the string:
";;aaaaa 1/2||10/01/2014|100,00||;;aaaaa 2/2||10/02/2014|100,00||" with UrlEncode:
"%3b%3baaaaa+1%2f2%7c%7c10%2f01%2f2014%7c100%2c00%7c%7c%3b%3baaaaa+2%2f2%7c%7c10%2f02%2f2014%7c100%2c00%7c%7c" Error:
{"Error while copying content to a stream."}
How can I pass these values pro web api?