2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03:00

Updating README

This commit is contained in:
Matt Zabriskie
2014-09-05 15:59:02 -06:00
parent c43f2b9710
commit 50955aba50
+9
View File
@@ -38,6 +38,9 @@ axios.get('/user?ID=12345')
.then(function (response) {
console.log(response);
})
.catch(function (response) {
console.log(response);
});
// Optionally the request above could also be done as
axios.get('/user', {
@@ -48,6 +51,9 @@ axios.get('/user', {
.then(function (response) {
console.log(response);
})
.catch(function (response) {
console.log(response);
});
```
Performing a `POST` request
@@ -60,6 +66,9 @@ axios.post('/user', {
.then(function (response) {
console.log(response);
})
.catch(function (response) {
console.log(response);
});
```
Aliases are provided for success and error