'Prevent okhttp3 using http2 with Frida

I debug an Android application with Frida that using okhttp3 library.

How can I prevent that library using HTTP2 and using only HTTP1.1?

When I run https://codeshare.frida.re/@BenGardiner/android-list-loaded-classes/ I got lot of classes for example :

okhttp3.internal.connection.RealConnection
okhttp3.internal.connection.RealConnectionPool
okhttp3.internal.http.HttpMethod
okhttp3.internal.http.RetryAndFollowUpInterceptor


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source