mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-08 02:30:03 +00:00
feat(esp_http_client): Event to signal last header download
When parsing ND-JSON streams, this is needed to indicate the point when the ND-JSON stream is considered open, which occurs just after the last HTTP_EVENT_ON_HEADER. ND-JSON stream clients cannot rely on the first HTTP_EVENT_ON_DATA, since that is only triggered by an event, which are optional and may never be sent, or only sent well after the last HTTP_EVENT_ON_HEADER. Closes #15952
This commit is contained in:
@@ -74,6 +74,9 @@ esp_err_t _http_event_handler(esp_http_client_event_t *evt)
|
||||
case HTTP_EVENT_ON_HEADER:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_ON_HEADER, key=%s, value=%s", evt->header_key, evt->header_value);
|
||||
break;
|
||||
case HTTP_EVENT_ON_HEADERS_COMPLETE:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_ON_HEADERS_COMPLETE");
|
||||
break;
|
||||
case HTTP_EVENT_ON_DATA:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_ON_DATA, len=%d", evt->data_len);
|
||||
/* Check if buffer is null, if yes, initialize it */
|
||||
|
||||
Reference in New Issue
Block a user