Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 12, 2020 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/63d1676cc39a4852ecdcd5baf78e601c to your computer and use it in GitHub Desktop.
Save parzibyte/63d1676cc39a4852ecdcd5baf78e601c to your computer and use it in GitHub Desktop.
/*
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&oacute;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