Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Share cookies with RN, remove cookie utils #388

Merged
merged 1 commit into from
Jun 6, 2017
Merged

Share cookies with RN, remove cookie utils #388

merged 1 commit into from
Jun 6, 2017

Conversation

Jacse
Copy link
Contributor

@Jacse Jacse commented Jun 5, 2017

I hope I am creating this PR the right place, as I couldn't find the branches mentioned.

This is a PR to address issues #156, #157, #220. It makes the android version share cookies with react native (regular fetch shares cookies with RNFetchBlob) as it already seems to do on iOS, so the PR harmonises the behaviour on the platforms.

Now that both platforms share cookies with react native, I though a very sensible move would be to remove this library's cookie-CRUD capabilities, as all use cases now can be solved by using other libraries such as react-native-cookies. This frees us from spending time on problems that are better solved elsewhere and focus on the main issue the library is meant to solve. It also minimises bloat as only a fraction of users will actually need to use cookie CRUD-features.

I makes even more sense considering CRUD isn't really working in this library. So I say: Let others do the cookie-manipulation and lets just share cookies with react-native. It will take away a lot of confusion and pain from users (especially when the two platforms behave differently!).

I'm not too sharp in Objective-C (or Java for that matter) so some testing will need to be done.

@wkh237 wkh237 merged commit 4ea868f into wkh237:master Jun 6, 2017
@wkh237
Copy link
Owner

wkh237 commented Jun 6, 2017

@Jacse , thanks for the PR, great job 👍

@@ -196,7 +194,7 @@ else if(this.options.fileCache)
if (this.options.trusty) {
clientBuilder = RNFetchBlobUtils.getUnsafeOkHttpClient();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should have been clientBuilder = RNFetchBlobUtils.getUnsafeOkHttpClient(client); so it can build on top of the react-native client. I must have forgotten to change it. @wkh237 could you change it on master or should I submit a new PR?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will do this.

wkh237 added a commit that referenced this pull request Jun 6, 2017
@Jacse
Copy link
Contributor Author

Jacse commented Jun 6, 2017

Thanks for merging @wkh237. Wiki should be updated as well.

@wkh237 wkh237 mentioned this pull request Jul 6, 2017
4 tasks
@Brucbbro
Copy link

Can we please get an example of how to use react-native-cookies along with this library? I really can't get a hang of it...

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

Successfully merging this pull request may close these issues.

3 participants