Is it ok to call .newBuilder() for okhttp for each calls for a specific part of an app or I should try to cache it at an higher level ?
j
jessewilson
04/08/2024, 11:51 AM
It’s okay
jessewilson
04/08/2024, 11:52 AM
What’s changing per-request?
t
Tolriq
04/08/2024, 11:57 AM
Just the timeouts for a specific tag extractor stuff that can trigger slow calls on some providers. Since I don't need the extended timeouts for all the other calls, doing it at the extractor side is nice. Thanks for confirming.
y
yschimke
04/08/2024, 12:24 PM
Interceptors can override per call. If it's cleaner that way
t
Tolriq
04/08/2024, 12:33 PM
In this case the 2 modules are not aware of each other's so the okhttp provider can't add the interceptor and that's why I prefer that the receiver part can override timeouts instead of the provider providing 2 different okhttp for different purpose.