We can't set cookies using setFromResponse method...
CookieManager.setFromResponse(
'http://example.com',
'user_session=abcdefg; path=/; expires=Thu, 1 Jan 2030 00:00:00 -0000; secure; HttpOnly')
.then((res) => {
// `res` will be true or false depending on success.
console.log('CookieManager.setFromResponse =>', res);
});
In this code pass string cookie props to setFromResponse, but we can't set some cookies at once.
The reason why, in CookieManagerModule.java convert string cookies to string List, but converting List seems not working well.
If we will set some cookies...
we must call setFromResponse method some times same as cookies length.
This code work.
CookieManager.setFromResponse(
'http://example.com',
'user_session=abcdefg;')
.then((res) => {
// `res` will be true or false depending on success.
console.log('CookieManager.setFromResponse =>', res);
});
We can't set cookies using setFromResponse method...
In this code pass string cookie props to setFromResponse, but we can't set some cookies at once.
The reason why, in CookieManagerModule.java convert string cookies to string List, but converting List seems not working well.
If we will set some cookies...
we must call setFromResponse method some times same as cookies length.
This code work.