Home > Mobile >  Why springboot Android terminal access to the session with the background of inconsistent?
Why springboot Android terminal access to the session with the background of inconsistent?

Time:09-24

Environment is springboot2.0, jdk1.8
Android end get sessionid


Springboot background the sessionid



Android client receives the session code

 
JSONObject JSONObject=new JSONObject (the response body (), string ());
//if (jsonObject. Get int (" code ")==200) {
Headers Headers.=the response Headers ();
List Cookies=headers. Values (" Set - cookies ");
String=session cookies. Get (0);
String sessionid=session. The substring (0, session. IndexOf (";" ));
The v (" session ", the session).
The v (" sessionid "sessionid);

  • Related