A Simple Header only implementation of Http Server that allows the registration of callback functions. This is based on the Arduino Server class.
More...
|
| HttpServer (WiFiServer &server, int bufferSize=1024) |
|
| ~HttpServer () |
|
IPAddress & | localIP () |
| Provides the local ip address. More...
|
|
bool | begin (int port, const char *ssid, const char *password) |
|
bool | begin (int port) |
| Starts the server on the indicated port. More...
|
|
void | end () |
| stops the server_ptr More...
|
|
void | rewrite (const char *from, const char *to) |
| adds a rewrite rule More...
|
|
void | on (const char *url, TinyMethodID method, web_callback_fn fn, void *ctx[]=nullptr, int ctxCount=0) |
| register a generic handler More...
|
|
void | on (const char *url, TinyMethodID method, const char *mime, web_callback_fn fn) |
| register a handler with mime More...
|
|
void | on (const char *url, TinyMethodID method, const char *mime, const char *result) |
| register a handler which provides the indicated string More...
|
|
void | on (const char *url, TinyMethodID method, const char *mime, const uint8_t *data, int len) |
| register a handler which provides the indicated string More...
|
|
void | on (const char *url, TinyMethodID method, Url &redirect) |
| register a redirection More...
|
|
void | on (const char *url, TinyMethodID method, HttpTunnel &tunnel) |
| register a redirection More...
|
|
bool | onRequest (const char *path) |
|
void | replyChunked (const char *contentType, Stream &inputStream, int status=200, const char *msg=SUCCESS) |
| chunked reply with data from an input stream More...
|
|
void | replyChunked (const char *contentType, int status=200, const char *msg=SUCCESS) |
| start of chunked reply: use HttpChunkWriter to provde the data More...
|
|
void | reply (const char *contentType, Stream &inputStream, int size, int status=200, const char *msg=SUCCESS) |
| write reply - copies data from input stream with header size More...
|
|
void | reply (const char *contentType, void(*callback)(Stream &out), int status=200, const char *msg=SUCCESS) |
| write reply - using callback that writes to stream More...
|
|
void | reply (const char *contentType, void(*callback)(Print &out), int status=200, const char *msg=SUCCESS) |
| write reply - using callback that writes to stream More...
|
|
void | reply (const char *contentType, const char *str, int status=200, const char *msg=SUCCESS) |
| write reply - string with header size More...
|
|
void | reply (const char *contentType, const uint8_t *str, int len, int status=200, const char *msg=SUCCESS) |
|
void | replyOK () |
| write OK reply with 200 SUCCESS More...
|
|
void | replyNotFound () |
| write 404 reply More...
|
|
void | reply (int status, const char *msg) |
| Writes the status and message to the reply. More...
|
|
HttpRequestHeader & | requestHeader () |
| provides the request header More...
|
|
HttpReplyHeader & | replyHeader () |
| provides the reply header More...
|
|
void | endClient () |
| closes the connection to the current client_ptr More...
|
|
void | crlf () |
| print a CR LF More...
|
|
void | addHandler (HttpRequestHandlerLine *handlerLinePtr) |
| adds a new handler More...
|
|
bool | doLoop () |
| Legacy method: same as copy();. More...
|
|
bool | copy () |
| Call this method from your loop! More...
|
|
Client & | client () |
| Provides the current client. More...
|
|
| operator bool () |
| Provides true if the server has been started. More...
|
|
const char * | localHost () |
| Determines the local ip address. More...
|
|
void | setNoConnectDelay (int delay) |
|
A Simple Header only implementation of Http Server that allows the registration of callback functions. This is based on the Arduino Server class.