@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;
}
Asked
Active
Viewed 937 times
-3

Andrii Omelchenko
- 13,183
- 12
- 43
- 79

Neha Sukhlecha
- 1
- 2
-
You need to add a lot more information please. What do you want it to do, and what is it currently doing? – LordWilmore Nov 15 '16 at 09:22
1 Answers
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
-
add in app controller on create but still gives status code 422 – Neha Sukhlecha Nov 15 '16 at 10:01