context-path 대응
This commit is contained in:
@@ -7,10 +7,18 @@
|
||||
*/
|
||||
|
||||
class APIClient {
|
||||
constructor() {
|
||||
|
||||
CLIENT_URL = 'mgmt/api/test.do';
|
||||
|
||||
constructor(contextPath) {
|
||||
window.globals = {};
|
||||
this.variables = {};
|
||||
this.abortController = null;
|
||||
this.contextPath = contextPath || '/';
|
||||
}
|
||||
|
||||
getClientUrl() {
|
||||
return this.contextPath + this.CLIENT_URL;
|
||||
}
|
||||
|
||||
async sendAPIRequest(model, preProcessCallback, consoleOutput) {
|
||||
@@ -67,7 +75,7 @@ class APIClient {
|
||||
const {signal} = this.abortController;
|
||||
|
||||
try {
|
||||
return fetch('/mgmt/api/test.do', {
|
||||
return fetch(this.getClientUrl(), {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user