URL encoding is usually the way to go when you need to encode value to be part of http post body, especially for form data. But if you're sending JSON, just use JSON.stringify()—it handles special chars automatically.
Watch out for nested objects tho, some frameworks might not parse them correctly.
For quick testing, check out Postman or Burp Suite to see how your payload looks encoded.
Watch out for nested objects tho, some frameworks might not parse them correctly.
For quick testing, check out Postman or Burp Suite to see how your payload looks encoded.
