If HTTP Everywhere is installed, it will break all non-HTTPS XMLHttpRequests from other add-ons. Therefore, detect the presence of HTTP Everywhere and always use HTTPS for API requests if it's installed.
You can check whether HTTPS Everywhere is installed with the following method and then default to HTTPS to fix the issue:
"They should be able to try the following:
var https_everywhere =
Components.classes["@eff.org/https-everywhere;1"]
.getService(Components.interfaces.nsISupports).wrappedJSObject;
If that does not raise an exception, HTTPS Everywhere is installed."
If HTTP Everywhere is installed, it will break all non-HTTPS XMLHttpRequests from other add-ons. Therefore, detect the presence of HTTP Everywhere and always use HTTPS for API requests if it's installed.