react-native-auto-height-image
react-native-auto-height-image copied to clipboard
passing headers does not work
Hello , I tried to pass Authorization header in headers object but it doesn't work, but it works with <Image/> component ,maybe it's a bug?
@miladrasooli Please provide more information:
Codes to reproduce the issue:
...
Steps to reproduce the issue:
- ...
- ...
Expected result: ...
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.
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.
Thanks , Good to know , I hope it'll be added in next releases