Android 4.4 http api bugs?

后端 未结 3 1693
旧时难觅i
旧时难觅i 2021-01-11 12:35

I decided to start testing my app with Android 4.4 and noticed that the Android HTTP connection APIs are much stricter than before? I have never had this issue and I assume

3条回答
  •  攒了一身酷
    2021-01-11 12:42

    I've implemented a solution based on the Apache HttpClient, you can find it as a gist here.

    Here is how to use it:

    IcyGetRequest request = new IcyGetRequest(urlStr);
    HttpResponse response = request.get();
    int responseCode = response.getStatusLine().getStatusCode();
    

提交回复
热议问题