import qs from "querystring"
	
	export async function getData(url) {
	    const result =await fetch(url);
	    const data=await result.json();
	    return data;
	}
	
	export async function postData(url,data) {
	    const result =await fetch(url, {
	        method: "post",
	        headers: {
	            'Accept': 'application/json, text/plain, */*',
	            'Content-Type': 'application/x-www-form-urlencoded'
	        },
	        body:qs.stringify(data)
	    })
	    
	    const data=await result.json();
	    return data;
	}
Logo

欢迎加入 MCP 技术社区!与志同道合者携手前行,一同解锁 MCP 技术的无限可能!

更多推荐