main/httpd.c
static esp_err_t handle_get_conf(httpd_req_t * req)
{
    char json[140];
    size_t len = sizeof(json);
    if ( config_serialize(json, &len) != ESP_OK ) {
        static const char resp[] = "Cannot generate a response";
        httpd_resp_set_status(req, HTTPD_500);
        return httpd_resp_send(req, resp, sizeof(resp) - 1);
    }
    httpd_resp_set_type(req, HTTPD_TYPE_JSON);
    return httpd_resp_send(req, json, len);
}
/**
 * Handles GET "/conf" requests.
 *
 * Returns the app configuration serialized into JSON.
 *
 * @param req HTTP request
 */
Handles GET "/conf" requests.
Returns the app configuration serialized into JSON.

@param req HTTP request
Handles GET " / conf " requests . Returns the app configuration serialized into JSON . @param req HTTP request
static esp_err_t handle_get_conf(httpd_req_t * req)
{
    char json[140];
    size_t len = sizeof(json);
    if ( config_serialize(json, &len) != ESP_OK ) {
        static const char resp[] = "Cannot generate a response";
        httpd_resp_set_status(req, HTTPD_500);
        return httpd_resp_send(req, resp, sizeof(resp) - 1);
    }
    httpd_resp_set_type(req, HTTPD_TYPE_JSON);
    return httpd_resp_send(req, json, len);
}
static esp_err_t handle_get_conf ( httpd_req_t * req ) { char json [ 140 ] ; size_t len = sizeof ( json ) ; if ( config_serialize ( json , & len ) != ESP_OK ) { static const char resp [ ] = " " ; httpd_resp_set_status ( req , HTTPD_500 ) ; return httpd_resp_send ( req , resp , sizeof ( resp ) - 1 ) ; } httpd_resp_set_type ( req , HTTPD_TYPE_JSON ) ; return httpd_resp_send ( req , json , len ) ; }
Handles GET "/conf" requests.
Handles GET " / conf " requests .