OKhttp를 쓰면 그냥 써도 되는 것으로 압니다만,
저는 retrofit2와 okhttp3 를 써서 http나 https나 코드의 차이가 없습니다.
아래 stackoverflow를 보니, retrofit2를 쓰지 않아도 okhttp 만으로도 https 질의가 잘 되는 것 같네요. (롤리팝 이상에서는)
(테스트 안해 보았습니다.)
https://github.com/mattleibow/square-bindings/issues/1
상기 링크에서 아래부분:
OkHttpClient client = new OkHttpClient ();
// only include our custom factory for the older Androids
if (Android.OS.Build.VERSION.SdkInt < BuildVersionCodes.L) {
client.SetSslSocketFactory (new CompleteSSLSocketFactory ());
}
Request request = new Request.Builder ().Url ("https://<yourserver>").Build ();
// UI thread here
Response response = await client.NewCall (request).ExecuteAsync (); // run on a new thread here
// UI thread here
string body = await response.Body ().StringAsync (); // read on a new thread here
// UI thread here
System.Diagnostics.Debug.WriteLine (body);