之前也没注意看,这次发现复制下来的 fetch 请求body
里面带有后斜杠\
, 这个写法没见过,请问各位老哥,这是什么?如果我把它放到postman
里去,是否要换成正常的 json 格式?
fetch("https://example.com/api/something", {
"headers": {
"accept": "application/json, text/plain, */*",
"content-type": "application/json",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin"
},
"body": "{\"key1\":\"value1\",\"key2\":\"value2\"}",
"method": "POST",
"mode": "cors",
"credentials": "include"
});