esp32 firmware for a toaster reflow oven WIP!!!!!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
reflower/components/httpd_utils/include/httpd_utils/captive.h

32 lines
687 B

#ifndef HTTPD_UTILS_CAPTIVE_H
#define HTTPD_UTILS_CAPTIVE_H
#include <esp_http_server.h>
#include <esp_err.h>
/**
* Redirect if needed when a captive portal capture is detected
*
* @param r
* @return ESP_OK on redirect, ESP_ERR_NOT_FOUND if not needed, other error on failure
*/
esp_err_t httpd_captive_redirect(httpd_req_t *r);
/**
* Get URL to redirect to. WEAK.
*
* @param r
* @param buf
* @param maxlen
* @return http(s)://foo.bar/
*/
esp_err_t httpd_captive_redirect_get_url(httpd_req_t *r, char *buf, size_t maxlen);
/**
* Get captive portal domain. WEAK.
*
* @return foo.bar
*/
const char * httpd_captive_redirect_get_domain();
#endif //HTTPD_UTILS_CAPTIVE_H