import axios , { Method } from 'axios' ; param path export async function request ( this , method , path , data ? ) { let query , body ; if ( method . toLowerCase ( ) === 'get' ) { query = data ; } else { body = data ; } return ( await axios ( { method , url : path . startsWith ( 'http' ) ? path : `${ this . _getApiEndpoint ( ) }${ path }` , headers : this . _getHttpHeaders ( { query , body } ) , data : body , params : query , ... ( this . serverType === 'os' ? { withCredentials : true } : { } ) , } ) ) . data as any ; }