I have an android app and i am making a request using Volley. In the header of the response it is sending back a set cookie header that i need to save. The issue is i override parse network response and in the response headers map all the headers are there except the set cookie header. I know its being sent because i have Charles http monitor so i know its being sent but volley is ignoring it. any suggestions?
in my class that extends request and the set-cookie is always empty
@Override
protected Response<T> parseNetworkResponse(NetworkResponse response)
{
T parsedResponse = null;
switch (type){
parsedResponse = (T)Parser.parse(new String(response.data));
String sessionId = response.headers.get("Set-Cookie");
if(sessionId!=null)
{
sessionId = sessionId.split("=")[1];
SessionHelper.saveSessionId(mContext, sessionId);
Log.e("session","saved session");
}
}
return Response.success(parsedResponse, HttpHeaderParser.parseCacheHeaders(response));
}