fetch(url, {
method: 'post',
headers: {
"Content-type":
},
body: 'bar= foo& lorem=ipsum'
})
Should it be?
A) application/x-www-form-urlencoded; charset=UTF-8
B) text/html; charset=utf-8
C) application/json; charset=UTF-8
D) Content-Type: multipart/form-data; boundry=something
I've just started to learn JavaScript and APis. While looking at MDN docs I found there are different options to put in the headers. Just confused about which one to use?