mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Updating README
This commit is contained in:
@@ -10,6 +10,24 @@ Promise based XHR library
|
|||||||
- Specifying HTTP request headers
|
- Specifying HTTP request headers
|
||||||
- Automatic transforms for JSON data
|
- Automatic transforms for JSON data
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
Using bower:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ bower install axios
|
||||||
|
```
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install axios
|
||||||
|
```
|
||||||
|
|
||||||
|
## Compatability
|
||||||
|
|
||||||
|
Tested to work with >=IE8, Chrome, Firefox, Safari, and Opera.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
Performing a `GET` request
|
Performing a `GET` request
|
||||||
@@ -143,7 +161,7 @@ When using the alias methods `url`, `method`, and `data` properties don't need t
|
|||||||
|
|
||||||
For either `success` or `error`, the following response will be provided.
|
For either `success` or `error`, the following response will be provided.
|
||||||
|
|
||||||
```
|
```js
|
||||||
axios.get('/user/12345')
|
axios.get('/user/12345')
|
||||||
.success(function (
|
.success(function (
|
||||||
// `data` is the response that was provided by the server
|
// `data` is the response that was provided by the server
|
||||||
@@ -163,24 +181,6 @@ axios.get('/user/12345')
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installing
|
|
||||||
|
|
||||||
Using bower:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ bower install axios
|
|
||||||
```
|
|
||||||
|
|
||||||
Using npm:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install axios
|
|
||||||
```
|
|
||||||
|
|
||||||
## Compatability
|
|
||||||
|
|
||||||
Tested to work with >=IE8, Chrome, Firefox, Safari, and Opera.
|
|
||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
|
|
||||||
axios is heavily inspired by Angular's $http service.
|
axios is heavily inspired by Angular's $http service.
|
||||||
|
|||||||
Reference in New Issue
Block a user