Protocol to intercept request and test for authentication and certificate pinning, or mock ajax calls