Setting request headers for loaders

Hi, this is my first post so first I want to thank mrdoob and all the contributors for this fantastic library.

Description of the problem

I need to send specific headers with my TextureLoader request (XMLHttpRequest.setRequestHeader()) but I do not see any way to do that (I’m currently using r80).

Three.js version
  • r80
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

1 thought on “Setting request headers for loaders

  1. As I wrote, ImageLoader called by TextureLoader no longer uses FileLoader and uses img.src = uri instead because of #10439.
    That means there’s no way to set headers for texture even if we add setRequestHeader() method to loaders now.
    (Please see the latest revision, not r80)

    I’d suggest that we add setRequestHeader() to FileLoader (I’m gonna make PR soon) and
    you override ImageLoader.load() to use FileLoader in it by yourself on your environment so far
    if you wanna keep using existing TextureLoader.
    (Refer to e7f7d33 to revert)

Comments are closed.