2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-02 16:04:10 +03:00

Updating README

This commit is contained in:
Matt Zabriskie
2016-03-04 10:39:11 -07:00
parent 371b82a2a0
commit ab2fba805e
+14 -2
View File
@@ -107,12 +107,24 @@ Requests can be made by passing the relevant config to `axios`.
##### axios(config)
```js
// Send a POST request
axios({
method: 'get',
url: '/user/12345'
method: 'post',
url: '/user/12345',
data: {
firstName: 'Fred',
lastName: 'Flintstone'
}
});
```
##### axios(url[, config])
```js
// Sned a GET request (default method)
axios('/user/12345');
```
### Request method aliases
For convenience aliases have been provided for all supported request methods.