Manually set Cookie header using PhoneGap FileTransfer

I have a problem with cookies when you set them manually to request Phonegap FileTransfer.

I tried to set a cookie using

document.cookie="JSESSIONID=........"; 

and

  params.headers={'Cookie':"JSESSIONID=..."}; 

Then, after making these changes, I found someone suggesting: https://stackoverflow.com/a/312960/

But after all this, the cookie header will not be sent in the request.

I need to set this cookie manually because I use FileTransfer for the request.

Any help or suggestion? Thanks in advance.

+4
source share

All Articles