Files
NexQuant/web/src/utils/request.js
T
XianBW 14395488b9 feat: add a web UI server (#1345)
* update rdagent cmd

* fix log error message

* use multiProcessing.Process instead of subprocess.Popen

* add traces to gitignore

* add user interactor in RDLoop (finance scenarios)

* add interactor (feedback, hypothesis) for quant scens

* fix the test_end in qlib conf

* add features init config, general instruction to qlib scenarios

* set base features for based exp

* fix bug when combine factors

* move traces folder to git_ignore_folder

* fix bug in features init

* fix quant interact bug

* fix logger warning error

* bug fixes

* modify rdagent logger, now it can set file output

* adjust cli functions and fix logger bug

* fix server port transport problem

* update server_ui in cli

* add web code

* fix CI problem

* black fix

* update web ui README

* update README

* update readme
2026-03-18 14:04:52 +08:00

37 lines
786 B
JavaScript

import axios from 'axios'
axios.defaults.headers.post['Content-Type'] = 'application/json'
const service = axios.create({
baseURL: ''
})
service.defaults.timeout = 5 * 60 * 1000;
// request拦截器
service.interceptors.request.use(
config => {
if (config.data) {}
if (config.params) {
// console.log('request: ', config.params)
}
return config
},
error => {
console.log('error-request: ', error)
return error
}
)
// respone拦截器
service.interceptors.response.use(
response => {
return response.data
},
error => {
console.log('error-response: ', error)
console.log('error-response: ', error.response)
return error.response
}
)
export default service