I am sending a StringRequest using Volley to update a single record in mysql.The url is fine when i am sending the same request from postman i am getting result but when i send the request from android its not sent. I am not getting whats the issue.I am sendin two values that too iam sending it in url.Here is the code
StringRequest req = new StringRequest(Request.Method.PUT, url,new Response.Listener<String>() {
@Override
public void onResponse(String response) {
resp = Integer.parseInt(response.toString());
hidepDialog();
if(resp == 1){
Toast.makeText(getApplicationContext(),"Success",Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(getApplicationContext(),"Failure",Toast.LENGTH_SHORT).show();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
});
Aucun commentaire:
Enregistrer un commentaire