title: How to use http/2 with Okhttp on Android devices?
body: <p>I'M testing a site that supports HTTP/2,<a href="https://www.h2check.org/#google.it" rel="noreferrer">like this</a>,
  and I try to use okhttp to send the request:</p>
  
  <pre><code>OkHttpClient okHttpClient = new OkHttpClient();
  
  Request request = new Request.Builder()
          .url("https://www.google.it")
          .build();
  
  
  okHttpClient.newCall(request).enqueue(new Callback() {
      @Override
      public void onFailure(Request request, IOException e) {
          e.printStackTrace();
      }
  
      @Override
      public void onResponse(Response response) throws IOException {
          Log.d("TestHttp", "OkHttp-Selected-Protocol: " + response.header("OkHttp-Selected-Protocol"));
          Log.d("TestHttp", "Response code is " + response.code());
      }
  });
  </code></pre>
  
  <p>In the log I got something like this:</p>
  
  <pre><code>OkHttp-Selected-Protocol: http/1.1
  </code></pre>
  
  <p>The okhttpClient chose to use http/1.1, how can I  force it to use HTTP/2?</p>