cartridge-java icon indicating copy to clipboard operation
cartridge-java copied to clipboard

Add an option for specifying the request timeout per single call

Open akudiyar opened this issue 1 year ago • 0 comments

Sometimes we do not want to change the default timeout for all the application code, but just add more time for a particular call (e.g. a large select). In that case, it may be useful to pass a special requestTimeout parameter to the request. We already have the "options" parameter for each call, which makes it possible to pass the new parameter there.

Proposal:

  • new field requestTimeout in options parameter for each call type (we may add it directly here or make a new base derived class)
  • pass that parameter in the base client implementation first to sendRequest, then to submitRequest
  • if the options or requestTimeout there are not specified, use the existing behavior - the default request timeout from the global config

akudiyar avatar Mar 16 '23 21:03 akudiyar