Cancel an HttpClient request

后端 未结 1 1767
梦如初夏
梦如初夏 2021-01-07 21:01

I am making a simple request for a file using HttpClient from the Apache Commons. Here is my current code:

    httpclient = new DefaultHttpClient();
    http         


        
相关标签:
1条回答
  • 2021-01-07 21:16

    You can use httpget.abort() method to abort the request mid way.

    See example here

    0 讨论(0)
提交回复
热议问题