1
的响应如何假扮我想在发展模式中执行以下代码:使用SC-服务器
App.statecharts.someState = SC.State.design({
enterState: function() {
SC.Request
.getUrl('/someUrl')
.json()
.header({ 'Accept': 'application/json' })
.notify(this, 'checkIsAnswer')
.send();
},
checkIsAnswer: function(response) {
console.log(response);
}
});
要做到这一点,我需要假从服务器的响应。例如:
例如: http://localhost:4020/someUrl
schould是一个静态JSON
如何使用sc-server
来伪造此响应。