Normal, we can send an Ajax request or submit a form to a server, which in the HTTP request body would be encoded like this: name=helloworld&age=123
.
Now our server only accepts JSON data as the request body. Is there a way to change the encoding method of the request body in JavaScript?