mirror of
https://github.com/tenrok/axios.git
synced 2026-06-02 16:04:10 +03:00
Updating README
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user