0.2.3 • Published 1 year ago

@monitor-sdk/xhr v0.2.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

@monitor-sdk/xhr

TODO: 捕获xhr的请求信息 请求,上报请求头、响应、请求耗时

Options

配置名称类型是否必填描述默认值
ignoreUrlsArray过滤请求url-
reportRespondsBoolean是否上报返回值false

Usage

cdn

<script src="[xhr-dist]/xhr.iife.js"></script>
<script>
    window.__MONITOR_OPTIONS__ = {
        dsn: {
            host: 'localhost:8888',
            init: '/project/init',
            upload: '/log/upload'
        },
        plugins: [
            MONITOR_XHR(),
        ],
    };
</script>
<script async src="/browser-dist/browser.iife.js"></script>

npm

import monitor from "@monitor-sdk/browser";
import xhrPlugin from "@monitor-sdk/xhr";
monitor({
    dsn: {
        host: 'localhost:8888',
        init: '/project/init',
        upload: '/log/upload'
    },
    plugins: [
        xhrPlugin(),
    ],
});
0.2.1

1 year ago

0.2.0

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago