Good day,
I am trying to make call to the invokeService method of the @haulmont/jmix-rest but I am getting the error "Failed to execute ‘fetch’ on ‘Window’: Request with GET/HEAD method cannot have body." I have added the service to the rest-services file and added the configurations for same to the application.properties file. The service method takes a single parameter value.
import { initializeApp, UserInfo } from "@haulmont/jmix-rest";
export class JmixUtility {
static JmixConnection = initializeApp({
apiUrl: "/rest/",
restClientId: "client",
restClientSecret: "secret",
});
static getCarsByModel() {
const token = getToken();
const header = { Authorization: `Bearer ${token.value}` };
this.JmixConnection.invokeService(
"serviceName",
"getCarsByModel?model=mazda",
{},
{ headers: header, method: "GET" }
).then (response=>{
});
}
}