How to get 401 response without handling it using try/catch in android
问题 I am using HttpUrlConnection to make network requests from my android application. Everything works fine except one thing, 401. Whenever the server returns response with status code 401, my app throws IOException with a message stating, "no authentication challenge found" . After googling it, I haven't found a single solution, but only workaround (handling it using try/catch, assuming its a 401 response). here is the code snippet: public Bundle request(String action, Bundle params, String