javascript - Add header to <img> GET -
is there way add header standard html tag?
what have is: /path/to/image.png
except restful endpoint, , requires userid header.
get /path/to/image.png header userid: bobloblaw
this returns bytestream , poof, image.
however, hope use right in image tag. possible without apache forcing outgoing userid?
i'm hoping like
imageprovider.get().then(function(response) { // resultant bytestream })
note - not base64 transcoding. it's actual image stream.
no, that's not possible. don't control request headers browser sends along request <img>
tag.
use query parameter in url.