Today I learned
Encoding POST request body
Today I learned, that passing unencoded text into the body of a POST request is a bad idea. It could result in security issues and therefore always should be encoded.
One approach to resolve this is using
URLSearchParams. You can learn more
about the API on mdn:
Jake Archibald wrote a blog post about this topic, where he explains it in more depth: https://jakearchibald.com/2021/encoding-data-for-post-requests
Greetings MarcoGo back to other today-i-learned posts