Chat freely about anything...

User avatar
By popcorn
#1313 Thanks, Squonk. I'm still not there with sending the right header. Hope I will get there.

I'm now trying to get the XMLHttpRequest response. I'm getting error in webconsole...:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

I tried to send back:
***
AT+CIPSEND=0,100
>
HTTP/1.1 200 OK\r\n\r\nOrigin: test\r\nAccess-Control-Allow-Origin: *\r\n\r\nContent-Type: text/html\r\n\r\nHello world!\r\n\r\n
AT+CIPCLOSE=0\
***
Last edited by popcorn on Mon Oct 06, 2014 1:43 pm, edited 2 times in total.
User avatar
By popcorn
#1323 I'm a litle further...

In chrome I saw the header was received as: "200 OK\r\n"

So now I send the response in multiple lines over the serial like:
AT+CIPSEND=0,100
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *

----
Content-Type: data,data busy s...
SEND OK
----
AT+CIPCLOSE=0