我正在使用粒子光子设备,该设备是可以设置为侦听模式的物联网设备,该设备运行您连接到的http服务器以设置其内部wifi和其某些设备密钥。我遇到的问题是,当我从使用Firebase上使用https托管的应用程序中连接至其wifi时,我正在接收
Blocked loading mixed active content “http://192.168.0.1/device-id”[Learn More] request.js:150
Blocked loading mixed active content “http://192.168.0.1/set”[Learn More] request.js:150
TypeError: NetworkError when attempting to fetch resource.
引用这段代码
global.fetch(self._opts.url, {
method: self._opts.method,
headers: headersList,
body: body || undefined,
mode: 'cors',
credentials: opts.withCredentials ? 'include' : 'same-origin',
signal: signal
}).then(function (response) {
self._fetchResponse = response
self._connect()
}, function (reason) {
global.clearTimeout(self._fetchTimer)
if (!self._destroyed)
self.emit('error', reason)
})