This repository has been archived by the owner on Jan 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 314
got undefined on set cookie response #162
Comments
I have the same issue with @rahultatvasoft. Any idea ? Thanks. |
The set method in the native module returns nil in every situation (whether it was a success or not), that's why it returns undefined in JS. You can see here: You can use the CookieManager.get and CookieManager.getAll (this one only on iOS) methods to get the cookies from storage and verify if the cookie was saved successfully. |
I have forked the repo here: https://github.com/safaiyeh/react-native-cookie-store |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@joeferraro
"react": "16.8.6",
"react-native": "0.60.4",
"react-native-cookies": "^3.3.0",
import CookieManager from 'react-native-cookies';
CookieManager.set({
name: 'myCookie',
value: 'myValue',
domain: 'some domain',
origin: 'some origin',
path: '/',
version: '1',
expiration: '2015-05-30T12:30:00.00-05:00'
}).then((res) => {
console.log('CookieManager.set =>', res); // undefined
});
The text was updated successfully, but these errors were encountered: