一个全随机的刷装备小游戏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
396 B

export const post = (url, data) => {
const options = {
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json',
},
};
return new Promise((reslove, reject) => {
fetch(url, options)
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
});
};