Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing cookie in header for authentication JSessionid #129

Open
alyssonmessias opened this issue Jul 5, 2016 · 1 comment
Open

Passing cookie in header for authentication JSessionid #129

alyssonmessias opened this issue Jul 5, 2016 · 1 comment

Comments

@alyssonmessias
Copy link

Example:

     console.log("JSESSIONID="+jsessionID);
     var options = {
            Cookie: 'JSESSIONID='+jsessionID
      };

      if(path.substring(path.length - 4, path.length).toLowerCase() !== ".pdf" ){
         Alert.alert(
                  "Attention",
                  "It's not a possible to open document  because not is type pdf."
              );
        this.setState({'error':"Archive incompatible"});
      }else { 


         RNFS.downloadFile({ fromUrl: url, toFile: path, headers: options // headers: headers
            }).then(
          res => {
            console.log('res:'+res);
          }).then(content => {
            console.log('content:'+content);
        }).catch(error => {
          console.log('error###:'+error)
        });
    }
@yoginair
Copy link

@alyssonmessias any work around ?

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

No branches or pull requests

2 participants