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
來僞造此響應。