Sign in Go Pro

MockWebServer

Certificate Pinning and HTTPS

 

Previous

About

Say you want to restrict your app to talk to one particular domain, via https only. How do you configure that with OkHttp, and how to test that with MockWebServer ? In this episode you will learn: * How to set up Certificate Pinning in OkHttp * How to restrict OkHttp to https only * How to have MockWebServer use https * How to have the app and test use a matching socket factory ## Link [OkHttp HTTPS](https://github.com/square/okhttp/wiki/HTTPS) ## Source https://github.com/chiuki/mockwebserver-demo/tree/https-only

Lessons in MockWebServer