-3
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
    HashMap<String, String> headers = new HashMap<String, String>();
    headers.put("Content-Type", "application/json");
    headers.put("Authorization", Auth_token);
    headers.put("Cookie",  GlobleVariables.COOKIE_VALUE + Auth_token);
    return headers;
}
Andrii Omelchenko
  • 13,183
  • 12
  • 43
  • 79

1 Answers1

2

If you do not need compatibility with Android < 2.3 you just need to add this line of code in your onCreate of the activity or the application. That will activate default cookieManager for all httpURLconnections.

CookieHandler.setDefault(new CookieManager());

Source: Volley ignores Cookie header request

And you can find detail solution Here

Community
  • 1
  • 1
Swr7der
  • 849
  • 9
  • 28