-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
在tampermonkey 和scriptcat里行为不一样;
scriptcat里没有提交上去,好像只提交了一个[object object]字符串
// ==UserScript==
// @name test Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http*://*/*
// @icon https://www.google.com/s2/favicons?domain=httpbin.org
// @grant GM_xmlhttpRequest
// ==/UserScript==
(function () {
'use strict';
const url = 'http://httpbin.org/image/jpeg'
GM_xmlhttpRequest({
method: 'GET',
url: url,
responseType: "blob",
onload: function (req) {
console.log(req.status, req.response, typeof req.response)
GM_xmlhttpRequest({
method: 'PUT',
url: 'http://httpbin.org/anything',
data: req.response,
onload: function (req) {
console.log(req.status, req.response)
}
})
}
});
// Your code here...
})();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels