我正在尝试使用Ajax执行Swagger请求。但这不起作用。
在使用Rest客户端进行测试(我正确获得响应)时可以使用,但不适用于ajax
这是我使用的jquery代码(令牌键不完整):
function get_test(){
alert('okey');
{
"name": "somename",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@babel/polyfill": "^7.4.3",
"axios": "^0.18.0",
"axios-rest-client": "^0.1.11",
"simplebar-vue": "^1.0.0-alpha.6",
"vue": "^2.6.10",
"vue-js-modal": "^1.3.28",
"vue-meta": "^1.6.0",
"vue-router": "^3.0.6",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.6.0",
"@vue/cli-plugin-eslint": "^3.6.0",
"@vue/cli-service": "^3.6.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.18.0",
"sass-loader": "^7.1.0",
"svg-to-vue-component": "^0.3.8",
"vue-template-compiler": "^2.6.10"
}
}