I load some binary data using
$http.post(url, data, { responseType: "arraybuffer" }).success(
function (data) { /* */ });
In case of an error, the server responds with an error JSON object like
{ "message" : "something went wrong!" }
Is there any way to get the error response in a different type than a success response?
$http.post(url, data, { responseType: "arraybuffer" })
.success(function (data) { /* */ })
.error(function (data) { /* how to access data.message ??? */ })
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…