Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同一个路由模拟数据,不同的httpMethod, 如何对应到不同的test数据文件 #18

Open
Jim2013 opened this issue Mar 7, 2016 · 2 comments

Comments

@Jim2013
Copy link

Jim2013 commented Mar 7, 2016

比如我同一个项目里面有下面这两个异步请求
GET /A/B/C
POST /A/B/C
这两个请求我是需要模拟不同的返回数据的,这个如何做到呢?

目前我们在server.conf里面只能配一个
rewrite ^/A/B/C$ /page/A/B/C
这个是没办法区分httpMethod的。

@oxUnd
Copy link

oxUnd commented Mar 7, 2016

需要自己把连接 rewrite 到某个 jsp 文件上面,然后在 jsp 中自己判断 method 的来返回不同的数据。

@anota
Copy link

anota commented Jul 13, 2016

现在jello的spa的demo就是这么做的吗?两个都是get请求,是通过判断其他特征返回不同数据?看了下test的文件,不太懂这里两个相同请求是怎么配置的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants