#ifndef HTTPD_UTILS_CAPTIVE_H #define HTTPD_UTILS_CAPTIVE_H #include #include /** * 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