Created
February 12, 2020 02:06
-
-
Save parzibyte/63d1676cc39a4852ecdcd5baf78e601c to your computer and use it in GitHub Desktop.
This file contains 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
/* | |
Definimos funciones que serán invocadas cuando la URL solicitada | |
cumpla con cierta característica | |
*/ | |
void rutaRaiz() | |
{ | |
const char *HtmlRespuesta = "<h1>ESP8266 como servidor web</h1>" | |
"<p>Podemos tener código HTML</p>" | |
"<a href='https://parzibyte.me/blog'>By parzibyte</a>"; | |
servidor.send(200, "text/html", HtmlRespuesta); | |
} | |
void rutaNoEncontrada() | |
{ | |
servidor.send(404, "text/plain", "404"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment