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 headers does not work #21

Open
miladrasooli opened this issue Oct 17, 2018 · 4 comments
Open

passing headers does not work #21

miladrasooli opened this issue Oct 17, 2018 · 4 comments

Comments

@miladrasooli
Copy link

Hello ,
I tried to pass Authorization header in headers object but it doesn't work, but it works with component ,maybe it's a bug?

@vivaxy
Copy link
Owner

vivaxy commented Oct 18, 2018

@miladrasooli Please provide more information:

Codes to reproduce the issue:

...

Steps to reproduce the issue:

  1. ...
  2. ...

Expected result:
...

@miladrasooli
Copy link
Author

I thought it was self-explanatory,
I have image links which need authorization token to open , and I'm using this line of code to do so :

<AutoHeightImage source={{uri:'.............',headers:{Authorization:'...............'}}}/>

Unfortunately it doesn't work. When I change AutoHeightImage to Image it works.

@vivaxy
Copy link
Owner

vivaxy commented Oct 18, 2018

Currently, react-native-auto-height-image rely on Image.getSize API.

source prop supports method, headers and body. See.

Image.getSize API does not work with method, headers and body params. See.

In future, maybe we will replace Image.getSize with fetch.

@miladrasooli
Copy link
Author

Thanks , Good to know , I hope it'll be added in next releases

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

No branches or pull requests

2 participants