Why do we need request.setvalue for a post request

When practicing a post request today I forgot to use the setvalue method. Why is this method important and needed for a post request? Don't we just encode the data to JSON and put that as the httpbody and make the request

That's to inform the server of what type of data request it is going to receive. And process it as a json content.

https://stackoverflow.com/questions/4249609/form-content-type-for-a-json-http-post

Why do we need request.setvalue for a post request
 
 
Q