This project provides a simple mock server, which works with the Chrome plugin parrot-mocker.
Support:
Not support:
Install Chrome plugin, parrot-mocker, so that your pages have the ablity to intercept requests and forward to this mock server. Other usages without the plugin can refer to parrot-mocker project.
For example, if deployed in leancloud, please open your Chrome browser and visit index page first. Other instances like now.sh are similar.
Then visit your test page, i.e. my demo, which will send 3 different requests(xhr/jsonp/fetch) after loaded.
In the plugin, input the mock server address and click the green button. The test page will reload automatically.
Now you will find that requests are forwarded to the mock server, which are also visiable at index page. If visiting other pages in the same domain, their requests will also be forwarded to this mock server.
Click any request in the list, and click 'Add'. Then this request is added to mock.
Open config page, now you can edit the mock data. Remember to click 'Apply' to really use the mock data.
Refresh your test page to check whether the mock is working correctly.
By default, the server is launched on main port 8080, and sub-ports 8442/8443. Sub-ports can be visited by http/https correspondingly. Because my https is self-certified, if your browser gives a warning, please continue to visit.
node ./server/index.js
Or you can specify the port by an environment variable.
PORT=8888 HTTP_PORT=9442 HTTPS_PORT=9443 node ./server/index.js
To use local server, you should visit and set local address as mock server in step 2, i.e. https://127.0.0.1:8080
, and other steps are similar with above.
Parrot是一个虚拟机,旨在有效地编译和执行代码的动态语言。目前,它的主机的各种语言的实现在各个阶段的完成,包括Tcl,使用Javascript ,Ruby,Lua,Scheme, PHP中,Python,以及Perl 6 ,APL,和 .NET 等等超过几十种语言的代码翻译。 详情请看:http://www.parrot.org/languages
mocker-api 为 REST API 创建模拟 API。 当您尝试在没有实际 REST API 服务器的情况下测试应用程序时,它会很有用。 特征: ��内置支持热Mocker文件替换。 ��通过JSON快速轻松地配置API。 ��模拟API代理变得简单。 ��可以独立使用,无需依赖webpack和webpack-dev-server。 快速开始 mkdir mocker-app && cd
Parrot 是一个虚拟机,旨在有效地编译和执行解释语言的字节码。 Parrot 专为动态语言而设计。 Parrot 是各种语言的目标,如 Perl,Tcl,Ruby,Python 等。
我试图在我的parrot home OS中安装ZAP代理,但我无法安装它,我在终端中收到的错误如下:
问题内容: 我正在使用Websphere Portal 7.0并使用RAD 8.0创建一个portlet。我的portlet试图建立到远程服务器的db2连接。我在本地编写了一个Java程序来与服务器建立基本的JDBC连接,并从表中获取记录。代码工作正常;但是,当我将代码以及db2jcc4.jar添加到我的portlet时,连接不起作用。我正在使用基本的: 我认为使用Websphere数据源是正确的
问题内容: 我希望能够以不同于web.xml的方式修改/配置过滤器。这是2个过滤器的静态配置。我希望能够静态配置一个过滤器,并允许该过滤器加载其他过滤器。我只是想知道是否有人知道lib已有此功能。 使用Servlet API 2.5 我已经在Guice的GuiceFilter中完成了此操作,其中在运行时配置了过滤器。 问题答案: 只需执行与容器已完成的相同的工作即可。即,按照servlet过滤器所