0

I'm making a simple request to google.com with OkHttp3

private final OkHttpClient client = new OkHttpClient();
public void run(String url, Callback callback) {

    okhttp3.Request request = new okhttp3.Request.Builder()
            .url(url)
            .build();

    client.newCall(request).enqueue(callback);
}

And I see in fiddler this(red-okhttp request, green-browser)

enter image description here

Why OkHttp send http://google.com:443, why not https://google.com. Maybe he needs a certificate?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • I found the right solution [here](https://stackoverflow.com/questions/25509296/trusting-all-certificates-with-okhttp) you must ignores all SSL errors. – Yaroslav Glonin Mar 25 '18 at 18:07

0 Answers0