react-native-cookies icon indicating copy to clipboard operation
react-native-cookies copied to clipboard

How to access or set in session id from fetch(http) response

Open iiitmahesh opened this issue 8 years ago • 1 comments
trafficstars

How to access or set in session id from fetch(http) response I am getting session id from server at time of login , I need to access to cookie and need to reuse it. How to do this???

iiitmahesh avatar May 22 '17 12:05 iiitmahesh

Mentioned in https://github.com/joeferraro/react-native-cookies/issues/15#issuecomment-310502297

if(Platform.OS === "ios") {
  cookies = { "Set-Cookie": response.headers.get('set-cookie') };
} else {
  cookies = response.headers.get('set-cookie');
}

iegik avatar Aug 29 '17 14:08 iegik