-
Notifications
You must be signed in to change notification settings - Fork 317
SetResponse on iOS requires NSDictionary but JS Sends String? #15
Comments
+1.As a newer to RN, I don't know how to solve it... |
If you look at the method implementation it accepts only a dictionary, so we need to use the
|
@rseemann That still doesn't explain why it differs from the Android version, which for the record, works fine. let cookies = "Your cookie value string";
if(Platform.OS === "ios") {
cookies = {
"Set-Cookie": cookies
};
}
CookieManager.setFromResponse("https://example.org", cookies, () => {}); |
And if you're reading cookies from a fetch response
updated per @jariz comment below |
why not use |
Oh sure, thats probably better |
AFAIK, you can't read set-cookie headers from response. Fetch refuses to supply the header, if the cookie has a |
It appears that setResponse may be misaligned from the iOS Side to expect an NSDictionary when the documentation specifies to send a string for android. If this is the case can we either A) Line up the iOS side to accept a string and parse that into an NSDictionary for saving or B) Document the method on the iOS side as a noOP similar to what Set does on android.
The text was updated successfully, but these errors were encountered: