How to increase rest timeout in service facade

rest request always times out after 15 seconds.
This looks like the default timeout in the rest in Service Facade.

How can I increase the timeout for a REST call?
Is there a way to set custom timeout or make it longer than 15s?

i tried future also.but still i get 15s timeout.

The screenshot you put seems to be from the SimpleRequestFactory constructor. That is the default timeout for the httpClient, but there is also a timeout per request, which can be set(see line 314: request.idleTimeout(timeoutSeconds > 30 ? 30 : timeoutSeconds-1, TimeUnit.SECONDS);).

How are you using the rest client? You should be able to do something like this to change the timeout:

RestClient.RestResponse response = ec.service.rest().method(RestClient.Method.GET)
        .timeout(30)
        .uri(location)
        .call()

*Note that ec.service.rest() is equivalent to new RestClient()

  RestClient.RestResponse response = ec.service.rest()
                     .uri("${BaseUrl}/rest/s1/data/receive")
                     .method(RestClient.Method.POST)
                     .jsonObject(jsonBody)
                     .timeout(30)
                     .call()

i did same thing.but i got 15s timeout error

The RestClient is hard-coded to not use more than 30s timeout, see moqui-framework/framework/src/main/java/org/moqui/util/RestClient.java at 6136030ff30e540465cbab6027c53f6fa4e80e01 · moqui/moqui-framework · GitHub

I suppose this is due to its main usage being OpenSearch interactions where this makes sense.

The rest client needs to be written from zero. We need to upgrade to jetty 12 and all APIs changed. Furthermore, since on Java 21 we now have a builtin http client that we can utilize. So the rest client specifically might need a complete open heart surgery