I try to login in my application, when I try to call API using volley library, it\'s giving com.android.volley.ServerError and response code 400.
final String u
This error can mean BAD REQUEST, check the headers you are sending. Overring the getHeaders() method you can send the right headers.
@Override
public Map getHeaders() throws AuthFailureError {
return (headers != null || headers.isEmpty()) ? headers : super.getHeaders();
}
Also, usually the WebServices need application/json headers, as follow:
headers.put("Accept","application/json");
headers.put("Content-Type","application/json");