Skip to content

Instantly share code, notes, and snippets.

@pollux-
Last active March 7, 2019 01:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pollux-/cb1e59b6f59a52e1d406e8abe602b20b to your computer and use it in GitHub Desktop.
Save pollux-/cb1e59b6f59a52e1d406e8abe602b20b to your computer and use it in GitHub Desktop.
CertificatePinner -
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