While using the android-async-http
library I stumbled upon params.add()
.
I've been using params.put()
for a while and it seems better than add()
since it allows data types other than String (like int, long, object, file) while add()
does not.
RequestParams params = new RequestParams();
// So how is this
params.add("param_a", "abc");
// different from this
params.put("param_a", "abc");
// and which one should I use?
add()
for Arrays andput()
for everything else. – Groves