Basically it's a header sent in the request in addition to the request body. If you're sending say...video content to a server how is it supposed to know that from say an image?
There are several different kinds that can be seen here though usually you don't need content-type headers for things like POCOs, POJOs, and raw text. Here is a list of all the types
What are all the possible values for HTTP "Content-Type" header?
Here is how to change them in a fetch request from react (since you mentioned javascript):
fetch(url, {
method: "POST",
body: data,
headers: {
"Content-Type": "application/json"
},
credentials: "same-origin"
})
this would send a json data payload (you have to turn it into json manually) in a post request.
Also as an aside your post was tagged "java"....javascript and java are not the same thing.