Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Better document purpose of this library? #61

Open
slorber opened this issue Jul 21, 2017 · 1 comment
Open

Better document purpose of this library? #61

slorber opened this issue Jul 21, 2017 · 1 comment

Comments

@slorber
Copy link

slorber commented Jul 21, 2017

Hi,

This may seem crazy but I'm not sure to understand why this library should be used.

Is it possible to explain some common usecases?

The first question that comes to mind is weither or not this library can be used for cookie-based auth. Will cookies be automatically sent in every server request if I use fetch(url) for example?

Or is this library just some utility to parse cookies from response, and put them in some storage space?

@nolan-m
Copy link

nolan-m commented Aug 24, 2017

I can tell you why I'm using this library. I'm developing an app which uses cookie-based auth. Using fetch these cookies are automatically set on my requests. This is causing a few problems for me on requests when I do not want to use cookies. Setting credentials: 'omit' is supposed to remove the cookies from the request, but it is not currently working. Other people have had this problem and the work around seems to be using this library.

See facebook/react-native#1274

I also had a problem where if I set a cookie in the fetch header that cookie would just be added to the current cookies. It would not override the cookie with same name. Using this library I saw able to set and override those cookies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants