静态资源delay测试服务

2131次阅读  |  发布于5年以前

我们在开发的过程中,有时候需要测试一些浏览器的特性,需要将一些静态资源请求延时返回。

这种情况我们可以通过fiddler或者用PHP写个简单的服务来处理,但每次来写这个比较麻烦。

所以写了一个通用的服务来解决此类需求,http://delay.ueapp.com/

接口信息

该服务的地址为 http://delay.ueapp.com/delay, 有如下的参数

使用示例

<script src="http://delay.ueapp.com/delay?type=js&time=1&size=10&exec=1"></script>

    <link href="http://delay.ueapp.com/delay?type=css&time=1&size=10">

    <img src="http://delay.ueapp.com/delay?type=img&time=1&size=10&error=1">

    <iframe src="http://delay.ueapp.com/delay?type=html&time=1&size=10&error=1"></iframe>

开源

本服务是基于nodejs实现,使用了thinkjs框架,代码在 https://github.com/welefen/delay/

反馈

https://github.com/welefen/delay/issues

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8