ajax-hook

建立於 2023年08月17日
更新於 2023年08月17日
用于hook网页请求
總安裝量
430
今日新增
+2
使用者評分
- / 5.0 (0)
目前版本
1.0.1
// @require https://scriptcat.org/lib/1233/1.0.1/ajax-hook.js?sha384-IGEl+Adl3Ph4XD0y0wdNp9gcIVf4Rj59Cli4UUR39flTYQiY/UffN7gwsSdhT+8m
庫詳情
這是一個使用者腳本使用的庫,你可以在你的腳本中直接引用它。

ajax-hook,油猴可使用版

使用方法

参考Ajax-hook

demo
ah.proxy({
    //请求
    onRequest: (config, handler) => {
      handler.next(config);
    },
    //失败
    onError: (err, handler) => {
      handler.next(err);
    },
    //请求成功后
    onResponse: (response, handler) => {
console.log(response.response);
      handler.next(response);
    }
  });