关于GM_xmlhttpRequest
GM_xmlhttpRequest({
method: 'POST',
url,
data : JSON.stringify(data),
headers: {"Content-Type" : "application/json"},
...
})
@indefined 说道:
GM_xmlhttpRequest({ method: 'POST', url, data : JSON.stringify(data), headers: {"Content-Type" : "application/json"}, ... })
GM_xmlhttpRequest({
method: "POST",
url: "https://wiki.cs.money/graphql",
headers:{
"Content-Type": "application/json"
},
data:JSON.stringify({
"operationName": "price_on_cs_money",
"variables": {
"names": [
"CZ75-Auto | Red Astor (Factory New)"
]
},
"query": "query price_on_cs_money($names: [String!]!) {\n price_on_cs_money(names: $names) {\n name\n price\n float\n }\n}\n"
}),
timeout:2000,
onload: function(res){
console.log(res.status);
},
onerror:function(err){
console.log(err.status);
}
});
i tried it erro : 500,
@LInkerH, date
should be data
and onerro
should be onerror
.
@wOxxOm 说道: @LInkerH,
date
should bedata
andonerro
should be `onerror
OOOOOOOMG , THX!!!!
关于GM_xmlhttpRequest
如何使用GM_xmlhttpRequest,发送一次post请求,且"Content-Type": "application/json"。 试了很多方法都没有成功,难道只支持application/x-www-form-urlencoded 吗?