HttpsURLConnection: Connection Timed out error

前端 未结 5 1840
情深已故
情深已故 2020-12-07 04:21

I have a simple code for setting up a https connection to google and printing the response obtained.

import java.io.OutputStreamWriter;
import java.net.URL;
         


        
5条回答
  •  一个人的身影
    2020-12-07 04:32

    There is no way to tell exactly what is wrong since timing out is not expected behavior, even when sending a malformed request, the way you are. This is the general procedure I use to debug, however.

    Steps

提交回复
热议问题