Skip to content

Commit

Permalink
Fix CertificatePinner javadoc to use a Builder
Browse files Browse the repository at this point in the history
The provided example wouldn't compile because OkHttpClient doesn't have
a `setCertificatePinner()` method.
  • Loading branch information
positron committed Apr 19, 2016
1 parent bd22589 commit 75c23dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions okhttp/src/main/java/okhttp3/CertificatePinner.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
* CertificatePinner certificatePinner = new CertificatePinner.Builder()
* .add(hostname, "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=")
* .build();
* OkHttpClient client = new OkHttpClient();
* client.setCertificatePinner(certificatePinner);
* OkHttpClient client = OkHttpClient.Builder()
* .certificatePinner(certificatePinner)
* .build();
*
* Request request = new Request.Builder()
* .url("https://" + hostname)
Expand Down

0 comments on commit 75c23dd

Please sign in to comment.