apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
597 stars 886 forks source link

Add Browser support for using Cookies #88

Closed aroberson closed 9 years ago

aroberson commented 9 years ago

Added a property for browser to set the withCredentials flag on the XMLHttpRequest for upload and download

purplecabbage commented 9 years ago

Is 'withCredentials' available everywhere? I think this has potentially wider impact than just the cordova-browser platform. Shouldn't we check if xhr.withCredentials exists? Then this could become :

if('withCredentials' in xhr) {
  xhr.withCredentials = options.withCredentials || false;
}
aroberson commented 9 years ago

Duke, I did not do that on purpose as I wanted to keep it as close to possible to the original functionality. I can make the change.

I would have to check the other platforms. Most of them already handle the use of cookies properly which is why I did not apply the change elsewhere.