I just ran into the same problem. The deprecated classes from org.apache.http
have been removed in API 23
.
I ended up using android.util.Pair
. It works perfectly, and the code is shorter too:
List<Pair<String, String>> params = new ArrayList<>();
params.add(new Pair<>("username", username));
params.add(new Pair<>("password", password));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…