Call to InvokeService Failed

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 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}` };





      { headers: header, method: "GET" }
    ).then (response=>{

IinvokeService method works with POST method by default. Third argument of invokeService method is serialized and used as request body. You can try to use explicitly null or undefined in third argument instead of empty object {} for avoid this behavior.