Use getParams method to add body parameters to volley request
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> params = new HashMap<>();
// the POST Body parameters:
if (pack.getParams() != null && pack.getParams().size() > 0) {
params = pack.getParams();
return params;
}
return super.getParams();
}
Pack is wrapper class that contains address, bodyparams, passwords and more.
Create a Map<String, String>
and put your body parameters inside it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.