How can I adjust the timeout from the default (100s) for the JsonApiClient Client obtained from BlazorComponentBase (i.e.ServiceStack.Blazor.BlazorComponentBase)?
I would like to know how to make 2 types of adjustments:
For all requests (i.e. change the default)
For specific requests (i.e. override the default)
My applications are NET Core using Blazor WASM and ServiceStack 6.9.0 (under Windows).
That’s the only way to configure the HttpClient with a Timeout, but in WASM HttpClient is just a wrapper around the browser’s fetch API, so maybe it doesn’t implement HttpClient’s Timeout functionality properly.
I managed to increase the timeout by ensuring the client is used and not the Gateway:
// adjust to more than 100s default
var timeout =TimeSpan.FromSeconds(200);
Client.GetHttpClient().Timeout = timeout;
UseGateway = false;
Unfortunately, I receive intermittent “Bad Gateway” responses with the above code, which have proven impossible to debug. So, I no longer recommend the above to increase the HTTP timeout.