在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:code-mancers/interceptor开源软件地址:https://github.com/code-mancers/interceptor开源编程语言:TypeScript 46.8%开源软件介绍:InterceptorA browser extension that mocks AJAX request at the browser level so you can run front ends without really starting a backend server. DevelopmentIn Chrome
In Firefox
Release
How to useListening to requests made by the browserOnce you open the extension popup, it shows a UI as seen below. By default, Once you start listening, it shows the count of total AJAX requests in a small badge and list of incoming Request headers for listened requests are listed below the response form as shown in the screenshot. Response data returned by backend serverMany a times, before defining you mock response text, you would want to look at the response data returned by the server when the request is made. On clicking Specifying mock response dataYou can click the small arrow beside the URL, which shows a form in which you can specify a response to mock, when the same request is encountered next. You also need to specify the Content-Type header field and status code for the mock response through the dropdown available as shown below. Once the above fields are filled and checkbox is checked, click the You can intercept/mock multiple calls by checking as many checkboxes as you want Henceforth the same AJAX request is made by the browser, the browser is given a fake/mock response instead of the real one. You can also stop listening for The toggle switch is used to disable In the To mock the calls again, just toggle the switch to This blogpost makes things much more clear. TODO
AttributionIcons for this projects are used from Font Awesome
LicenseMIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论