我試圖找出檢查什麼被返回到我的反應,我.then{}
檢查數據
例如,我可以一的console.log添加到。這時最好的辦法{}查看返回的內容如果有的話?
下面是我在這個檢查數據不成功的嘗試:
return myValidationService.getUserDetails(userId)
.then(response => response.data.data
//This is where I want to add my log
console.log("This is my response data: " + response.data.data))
.catch(error => pageErrorService.go(pageErrorService.errorDetails.genericError, error));
我收到投訴我對上面的語法棉短絨雖然。
檢查這些數據的標準方法是什麼?
謝謝。我認爲我已經把它加入了這個功能,但由於某種原因,我的棉絨抱怨「;」不知道當我嘗試它時我錯過了什麼,但工作。謝謝! – Denoteone
請標記爲答案已解決 –