react-native-cookies
react-native-cookies copied to clipboard
[Question] Can it read HttpOnly cookies?
I'm asking because I tried (without this library) to get an HttpOnly cookie injecting "window.postMessage(document.cookie)"
in the injectedJavaScript
attribute of a website loaded in a WebView
and I got back all the cookies except the ones with HttpOnly set to true.
Thanks!
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');
}
It can read http only cookies