Form data encoding and decoding -- encodeURIComponent, URLSearchParams, FormData

This article mainly explains how to deal with various parameter problems through web api to prevent security problems and more convenient operation. Let's take a look at an example: const response = await fetch(url, { method: 'POST', body: `text=${text}`, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }) const js ...

Added by Mikkki on Thu, 30 Dec 2021 13:34:33 +0200