var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("http://xxx.xx.xx.xxx:xxx/phone/Cry.ashx?method=xxx&page=1&pagesize=10&where=1=1", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
get请求
string xxx= context.Request["xxx"];
post 代码
var formdata = new FormData();
formdata.append("aa", "1");
formdata.append("bb", "2");
var requestOptions = {
method: 'POST',
body: formdata,
redirect: 'follow'
};
fetch("http://xxx.xx.xx.xx:xxxx/phone/Cry.ashx?method=xxx", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
string xxx= context.Request.Form["xxx"].ToString();