2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Improving the response API

This commit is contained in:
Matt Zabriskie
2014-08-29 16:09:40 -06:00
parent 1c35eaadc0
commit d441f8392f
11 changed files with 38 additions and 29 deletions
+4 -4
View File
@@ -131,11 +131,11 @@
request.innerHTML = JSON.stringify(options, null, 2);
axios(options)
.success(function (res) {
response.innerHTML = JSON.stringify(res.data, null, 2);
.success(function (data) {
response.innerHTML = JSON.stringify(data, null, 2);
})
.error(function (res) {
response.innerHTML = JSON.stringify(res.data, null, 2);
.error(function (data) {
response.innerHTML = JSON.stringify(data, null, 2);
});
};