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