Re: Accessing WiFi Access Point from a preloaded HTML/Javasc
Posted: Tue Feb 25, 2020 4:45 pm
... switch the tablet WiFi over to the ESP WiFi
@quackmore: you are correct, I missed that. Apologies.
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
... switch the tablet WiFi over to the ESP WiFi
kenn wrote:btw the most efficient way to operate is to have the ESP simply output data as a json, and web page (or an application) is on the tablet.
So in your ESPthermostat, am I correct in thinking that the ESP8266 code doesn't actually know it's using CORS ?
Or is there something inside your ESPBOT code as well which I can't locate ?
GET /api/info HTTP/1.1
Host: 192.168.1.229
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36
Referer: http://192.168.1.229/
Accept-Encoding: gzip, deflate
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6
HTTP/1.1 200 OK
Server: espbot/2.0
Content-Type: application/json
Content-Length: 232
Access-Control-Allow-Origin: *
{"app_name":"App Example","app_version":"v1.0-96-ga6aa2de","espbot_name":"bad_flash","espbot_version":"v1.0-96-ga6aa2de","library_version":"v1.0-18-g50821c2","chip_id":"5169151","sdk_version":"3.1.0-dev(b1f42da)","boot_version":"7"}
GET /api/info HTTP/1.1
Host: 192.168.1.229
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36
Origin: null
Accept-Encoding: gzip, deflate
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7,de;q=0.6
HTTP/1.1 200 OK
Server: espbot/2.0
Content-Type: application/json
Content-Length: 232
Access-Control-Allow-Origin: *
{"app_name":"App Example","app_version":"v1.0-96-ga6aa2de","espbot_name":"bad_flash","espbot_version":"v1.0-96-ga6aa2de","library_version":"v1.0-18-g50821c2","chip_id":"5169151","sdk_version":"3.1.0-dev(b1f42da)","boot_version":"7"}