Created
June 24, 2013 03:26
-
-
Save jonathanhculver/5847581 to your computer and use it in GitHub Desktop.
http header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void printWebResponse(WiFiClient client, String lightStatus) { | |
| Serial.println(); | |
| // so the http request has ended and we can send a reply | |
| // send a standard http response header | |
| client.println("HTTP/1.1 200 OK"); | |
| client.println("Access-Control-Allow-Origin: *"); | |
| client.println("Content-Type: text/html"); | |
| client.println(); | |
| client.println("{\"status\":\""+lightStatus+"\"}"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment