Last active
March 7, 2019 01:19
-
-
Save pollux-/cb1e59b6f59a52e1d406e8abe602b20b to your computer and use it in GitHub Desktop.
CertificatePinner -
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CertificatePinner certificatePinner = new CertificatePinner.Builder() | |
.add("api.github.com", "sha256/6wJsqVDF8K19zxfLxV5DGRneLyzso9adVdUN/exDacw=") | |
.build(); | |
final OkHttpClient client = httpBuilder.certificatePinner(certificatePinner).build(); | |
Retrofit retrofit = new Retrofit.Builder() | |
.baseUrl(END_POINT) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.client(client) | |
.build(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment