Commit c94a9227 authored by 范雪寒's avatar 范雪寒

feat: setRequestHeader

parent 51935935
......@@ -53,6 +53,7 @@ cc.Class({
}
queryStr += params.join("&");
const xhr = new XMLHttpRequest();
xhr.setRequestHeader('Access-Control-Allow-Private-Network', true);
xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
callBack(xhr.responseText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment