试图使用Mockjs拦截post请求,获取到的option.body貌似是个字符串,
例如这样:
{
url: "http://test.cn/entity/save",
type: "POST",
body: "name=abc&type=1"}请问是否有什么设置能保证能直接获取成json,比如下面这样
{
url: "http://test.cn/entity/save",
type: "POST",
body: {
name: "abc",
type: 1
}
}相关分类