private static OkHttpClient createOkHttpClient ( Long timeoutSeconds ) { OkHttpClient . Builder builder = new OkHttpClient . Builder ( ) ; if ( timeoutSeconds != null ) { builder . connectTimeout ( timeoutSeconds , TimeUnit . SECONDS ) ; builder . readTimeout ( timeoutSeconds , TimeUnit . SECONDS ) ; builder . writeTimeout ( timeoutSeconds , TimeUnit . SECONDS ) ; } return builder . build ( ) ; }
Create OkHttpClient client for Web3j .