# axios
[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios)
[![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios)
[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios)
[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)
[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios)
[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios)
[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios)
Promise based HTTP client for the browser and node.js
## Features
- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
- Make [http](http://nodejs.org/api/http.html) requests from node.js
- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
- Intercept request and response
- Transform request and response data
- Cancel requests
- Automatic transforms for JSON data
- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
## Browser Support
![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
--- | --- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)
## Installing
Using npm:
```bash
$ npm install axios
```
Using bower:
```bash
$ bower install axios
```
Using yarn:
```bash
$ yarn add axios
```
Using cdn:
```html
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
```
## Example
### note: CommonJS usage
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:
```js
const axios = require('axios').default;
// axios.<method> will now provide autocomplete and parameter typings
```
Performing a `GET` request
```js
const axios = require('axios');
// Make a request for a user with a given ID
axios.get('/user?ID=12345')
.then(function (response) {
// handle success
console.log(response);
})
.catch(function (error) {
// handle error
console.log(error);
})
.finally(function () {
// always executed
});
// Optionally the request above could also be done as
axios.get('/user', {
params: {
ID: 12345
}
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
})
.finally(function () {
// always executed
});
// Want to use async/await? Add the `async` keyword to your outer function/method.
async function getUser() {
try {
const response = await axios.get('/user?ID=12345');
console.log(response);
} catch (error) {
console.error(error);
}
}
```
> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet
> Explorer and older browsers, so use with caution.
Performing a `POST` request
```js
axios.post('/user', {
firstName: 'Fred',
lastName: 'Flintstone'
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
```
Performing multiple concurrent requests
```js
function getUserAccount() {
return axios.get('/user/12345');
}
function getUserPermissions() {
return axios.get('/user/12345/permissions');
}
axios.all([getUserAccount(), getUserPermissions()])
.then(axios.spread(function (acct, perms) {
// Both requests are now complete
}));
```
## axios API
Requests can be made by passing the relevant config to `axios`.
##### axios(config)
```js
// Send a POST request
axios({
method: 'post',
url: '/user/12345',
data: {
firstName: 'Fred',
lastName: 'Flintstone'
}
});
```
```js
// GET request for remote image
axios({
method: 'get',
url: 'http://bit.ly/2mTM3nY',
responseType: 'stream'
})
.then(function (response) {
response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
});
```
##### axios(url[, config])
```js
// Send a GET request (default method)
axios('/user/12345');
```
### Request method aliases
For convenience aliases have been provided for all supported request methods.
##### axios.request(config)
##### axios.get(url[, config])
##### axios.delete(url[, config])
##### axios.head(url[, config])
##### axios.options(url[, config])
##### axios.post(url[, data[, config]])
##### axios.put(url[, data[, config]])
##### axios.patch(url[, data[, config]])
###### NOTE
When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
### Concurrency
Helper functions for dealing with concurrent requests.
##### axios.all(iterable)
##### axios.spread(callback)
### Creating an instance
You can create a new instance of axios with a custom config.
##### axios.create([config])
```js
const instance = axios.create({
baseURL: 'https://some-domain.com/api/',
timeout: 1000,
headers: {'X-Custom-Header': 'foobar'}
});
```
### Instance methods
The available instance methods are listed below. The specified config will be merged with the instance config.
##### axios#request(config)
##### axios#get(url[, config])
##### axios#delete(url[, config])
##### axios#head(url[, config])
##### axios#options(url[, config])
##### axios#post(url[, data[, config]])
##### axios#put(url[, data[, config]])
##### axios#patch(url[, data[, config]])
##### axios#getUri([config])
## Request Config
These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.
```js
{
// `url` is the server URL that will be used for the request
url: '/user',
// `method` is the request method to be used when making the request
method: 'get', // default
// `baseURL` will be prepended to `url` unless `url` is absolute.
// It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
// to methods of that instance.
baseURL: 'https://some-domain.com/api/',
// `transformRequest` allows changes to the request data before it is sent to the server
// This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
// The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
// FormData or Stream
// You may modify the headers object.
transformRequest: [function (data, headers) {
// Do whatever you want to transform the data
return data;
}],
// `transformResponse` allows changes to the response data to be made before
// it is passed to then/catch
transformResponse: [function (data) {
// Do whatever you want to transform the data
return data;
}],
// `headers` are custom headers to be sent
headers: {'X-Requested-With': 'XMLHttpRequest'},
// `params` are the URL parameters to be sent with the request
// Must be a plain object or a URLSearchParams object
params: {
ID: 12345
},
// `paramsSerializer` is an optional function in charge of serializing `params`
// (e.g. https://w
没有合适的资源?快使用搜索试试~ 我知道了~
个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip
共342个文件
js:118个
java:66个
jpg:54个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 115 浏览量
2024-07-02
10:44:50
上传
评论 1
收藏 17.49MB ZIP 举报
温馨提示
个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip 【1】项目代码完整且功能都验证ok,确保稳定可靠运行后才上传。欢迎下载使用!在使用过程中,如有问题或建议,请及时私信沟通,帮助解答。 【2】项目主要针对各个计算机相关专业,包括计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网等领域的在校学生、专业教师或企业员工使用。 【3】项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 【4】如果基础还行,或热爱钻研,可基于此项目进行二次开发,DIY其他不同功能,欢迎交流学习。 【备注】 项目下载解压后,项目名字和项目路径不要用中文,否则可能会出现解析不了的错误,建议解压重命名为英文名字后再运行!有问题私信沟通,祝顺利! 个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip 个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip 个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip
资源推荐
资源详情
资源评论
收起资源包目录
个人毕设-基于SpringBoot+Vue+协同过滤算法的电影推荐系统源码+数据库.zip (342个子文件)
.babelrc 402B
.babelrc 402B
mvnw.cmd 6KB
mvnw.cmd 6KB
.editorconfig 147B
.editorconfig 147B
.eslintignore 51B
.eslintignore 51B
.eslintrc 219B
.eslintrc 219B
.eslintrc 58B
.eslintrc 58B
1.gif 456B
1.gif 456B
.gitignore 213B
.gitignore 213B
.gitkeep 0B
.gitkeep 0B
index.html 272B
index.html 272B
maven-wrapper.jar 50KB
maven-wrapper.jar 50KB
MoviesService.java 10KB
MoviesService.java 10KB
RecommendText.java 5KB
RecommendText.java 5KB
MavenWrapperDownloader.java 5KB
MavenWrapperDownloader.java 5KB
ExcelUtils.java 4KB
ExcelUtils.java 4KB
MoviesController.java 3KB
MoviesController.java 3KB
UpText.java 3KB
UpText.java 3KB
AdminUserService.java 2KB
AdminUserService.java 2KB
FileController.java 2KB
FileController.java 2KB
Movies.java 2KB
Movies.java 2KB
HiighScoreText.java 2KB
HiighScoreText.java 2KB
AdminUserController.java 2KB
AdminUserController.java 2KB
RelationService.java 2KB
RelationService.java 2KB
RelationText.java 2KB
RelationText.java 2KB
MovicesApplication.java 2KB
MovicesApplication.java 2KB
Relation.java 2KB
Relation.java 2KB
ExcelText.java 1KB
ExcelText.java 1KB
Pages.java 1KB
Pages.java 1KB
AdminUser.java 1KB
AdminUser.java 1KB
TouristSettingController.java 974B
TouristSettingController.java 974B
TouristSetting.java 963B
TouristSetting.java 963B
UserSettingController.java 934B
UserSettingController.java 934B
UserSetting.java 858B
UserSetting.java 858B
Register.java 804B
Register.java 804B
RelationController.java 791B
RelationController.java 791B
AdminUserDao.java 727B
AdminUserDao.java 727B
MoviesDao.java 712B
MoviesDao.java 712B
TouristSettingService.java 659B
TouristSettingService.java 659B
UserSettingService.java 624B
UserSettingService.java 624B
n.java 573B
n.java 573B
RelationDao.java 376B
RelationDao.java 376B
TouristSettingDao.java 224B
TouristSettingDao.java 224B
MovicesApplicationTests.java 217B
MovicesApplicationTests.java 217B
UserSettingDao.java 215B
UserSettingDao.java 215B
QQͼƬ20181020103005.jpg 1.35MB
QQͼƬ20181020103005.jpg 1.35MB
QQͼƬ20181020102946.jpg 1.33MB
QQͼƬ20181020103034.jpg 1.33MB
QQͼƬ20181020102946.jpg 1.33MB
QQͼƬ20181020103034.jpg 1.33MB
1(25).jpg 1.26MB
1(25).jpg 1.26MB
QQͼƬ20181020103039.jpg 1.26MB
QQͼƬ20181020103039.jpg 1.26MB
1 (13).jpg 181KB
1 (13).jpg 181KB
共 342 条
- 1
- 2
- 3
- 4
资源评论
.whl
- 粉丝: 3908
- 资源: 4858
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功