diff --git a/src/ui/src/services/extension_service.ts b/src/ui/src/services/extension_service.ts index 9282fc18..e926c813 100644 --- a/src/ui/src/services/extension_service.ts +++ b/src/ui/src/services/extension_service.ts @@ -22,7 +22,7 @@ import {ExtensionCommand} from '../common/extension_command'; import {Extension} from '../common/types'; const EXTERNAL_GET_EXTENSIONS_API_PATH = '/api/v1/get_extensions'; -const EXTERNAL_SEND_CMD_API_PATH = '/apipost/v1/send_command'; +const EXTERNAL_SEND_CMD_API_PATH = '/api/v1/send_command'; /** * Service for managing model explorer extensions. @@ -40,15 +40,9 @@ export class ExtensionService { async sendCommandToExtension( cmd: ExtensionCommand, ): Promise<{cmdResp?: T; otherError?: string}> { - const requestData: RequestInit = { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - }; - requestData.body = JSON.stringify(cmd); try { - const resp = await fetch(EXTERNAL_SEND_CMD_API_PATH, requestData); + const url = `${EXTERNAL_SEND_CMD_API_PATH}?json=${JSON.stringify(cmd)}`; + const resp = await fetch(url); if (!resp.ok) { return {otherError: `Failed to convert model. ${resp.status}`}; }