I want to load an image from server that requires a token, but I don't know how to send the token in headers of axios or fetch request to get it loaded. How can I send headers with url to load my image from server in my React application?
Here is my image tag
<img
src={{
uri: `${activeCoverHash}`,
headers: { t: token }
}}
alt={i.name}
onLoad={() => console.log('___DONE___')}/>
but it gives me a 404 error. What can I do?
Actually I got that pattern from here, but it is only works on React Native not React.