+ Start a Discussion

special character & creates problem


I am sending a request, the body has special character & .
when the server on other side received it, it deletes the json after & and rending it invalid.

How can I replace the & but still keep it as it it
HttpResponse response = http.send(request);
thank you for suggestion
Best Answer chosen by Sandrine
SwethaSwetha (Salesforce Developers) 
HI Sandrine,
Your scenario looks simiar to https://salesforce.stackexchange.com/questions/195515/refrain-from-unescaping-special-characters-when-receiving-restcontext-json

Can you check how the payload is being sent?

Also see related : https://salesforce.stackexchange.com/questions/327651/special-characters-in-rest-api-url

If this information helps, please mark the answer as best. Thank you