B billzhan Active Member Licensed User Longtime User Apr 20, 2017 #1 Hi, OkHttp has been updated to 1.20 in B4J 5.0, following code raised an error since then. B4X: 'https://www.b4x.com/android/forum/threads/closed-okhttp-how-to-use-setmaxrequests-setmaxrequestsperhost.65610/#post-415626 Dim jo AsJavaObject = HttpClient1Dim nativeClient AsJavaObject = jo.GetField("client") nativeClient.RunMethodJO("getDispatcher", Null).RunMethod("setMaxRequests", Array (10)) nativeClient.RunMethodJO("getDispatcher", Null).RunMethod("setMaxRequestsPerHost", Array (10)) B4X: (RuntimeException) java.lang.RuntimeException: Method: getDispatcher not found in: okhttp3.OkHttpClient Tks,
Hi, OkHttp has been updated to 1.20 in B4J 5.0, following code raised an error since then. B4X: 'https://www.b4x.com/android/forum/threads/closed-okhttp-how-to-use-setmaxrequests-setmaxrequestsperhost.65610/#post-415626 Dim jo AsJavaObject = HttpClient1Dim nativeClient AsJavaObject = jo.GetField("client") nativeClient.RunMethodJO("getDispatcher", Null).RunMethod("setMaxRequests", Array (10)) nativeClient.RunMethodJO("getDispatcher", Null).RunMethod("setMaxRequestsPerHost", Array (10)) B4X: (RuntimeException) java.lang.RuntimeException: Method: getDispatcher not found in: okhttp3.OkHttpClient Tks,
Erel B4X founder Staff member Licensed User Longtime User Apr 20, 2017 #2 It should be dispatcher instead of getDispatcher. Upvote 0