You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Case 2: The stringified body.
// The string data does not need to be stringified again (this behavior follows Miniprogram).
// Send the data directly with a custom Content-Type, defaulting to ApplicationJson.
else if (typeof data === 'string') {
xhr.setRequestHeader(CONTENT_TYPE, contentType || APPLICATION_JSON);
xhr.send(data);
}
默认添加 content-type header 会触发 preflight,如果后端没处理好会跨域
The text was updated successfully, but these errors were encountered: