| 158 | } |
| 159 | |
| 160 | String headerValue(httpd_req_t *req, const char *name) { |
| 161 | size_t len = httpd_req_get_hdr_value_len(req, name); |
| 162 | if (!len) return ""; |
| 163 | std::vector<char> value(len + 1); |
| 164 | if (httpd_req_get_hdr_value_str(req, name, value.data(), value.size()) != ESP_OK) return ""; |
| 165 | return String(value.data()); |
| 166 | } |
| 167 | |
| 168 | String queryValue(httpd_req_t *req, const char *key) { |
| 169 | size_t len = httpd_req_get_url_query_len(req); |
no outgoing calls
no test coverage detected