Skip to content

Instantly share code, notes, and snippets.

@jinal90
Created May 20, 2020 21:22
Show Gist options
  • Save jinal90/3b117243979dbffa0888549f7676a36a to your computer and use it in GitHub Desktop.
Save jinal90/3b117243979dbffa0888549f7676a36a to your computer and use it in GitHub Desktop.
Code snippet to explain implementation of SSL pinning in Retrofit.
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://www.example.com")
.client(okHttpClientWithCertificatePinner)
.build();
YourServiceClass service = retrofit.create(YourServiceClass.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment