queue = Volley.newRequestQueue(this);
StringRequest request1 = new StringRequest(Request.Method.POST, url_post, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.e("MainActivity", response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> map = new HashMap<>();
map.put("type", "top");
map.put("key", "f7c582ae70a71ac819c00f2d5b54ab48");
return map;
}
};
queue.add(request1);
StringRequest request1 = new StringRequest(Request.Method.POST, url_post, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.e("MainActivity", response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> map = new HashMap<>();
map.put("type", "top");
map.put("key", "f7c582ae70a71ac819c00f2d5b54ab48");
return map;
}
};
queue.add(request1);