private String volleyPostStringRequest() {
StringRequest request = new StringRequest(Request.Method.POST, Constant.JUHE_URL_POST,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Toast.makeText(MainActivity.this, response, Toast.LENGTH_SHORT).show();
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(MainActivity.this, error.toString(), Toast.LENGTH_SHORT).show();
}
}){
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> hashMap = new HashMap<>();
hashMap.put("phone", "13429667914");
hashMap.put("key", "562609042fbd47baa063b1a2c4637758");
return hashMap;
}
};
request.setTag(STRING_POST_TAG);
MyApplication.getHttpQueues().add(request);
return request.getTag().toString();
}