Other

一 浏览器缓存

  1. 关闭浏览器缓存

Fetch

  • Fetch post请求
var url = 'https://example.com/profile';
var data = {username: 'example'};

fetch(url, {
  method: 'POST', // or 'PUT'
  body: JSON.stringify(data), // data can be `string` or {object}!
  headers: new Headers({
    'Content-Type': 'application/json'
  })
}).then(res => res.json())
.catch(error => console.error('Error:', error))
.then(response => console.log('Success:', response));
  1. res.json()/res.text() : 返回一个promise实例。

Fetch文档

MEAVN

  • 打包
    mvn clean package
原文地址:https://www.cnblogs.com/qifengle1412/p/12917097.html