esp_http_client: Add new status code 303 and 308

This commit is contained in:
Shubham Kulkarni 2022-03-17 13:49:44 +05:30 committed by BOT
parent 36457b1346
commit ec6f222625
2 changed files with 4 additions and 0 deletions

View File

@ -821,7 +821,9 @@ static esp_err_t esp_http_check_response(esp_http_client_handle_t client)
switch (client->response->status_code) {
case HttpStatus_MovedPermanently:
case HttpStatus_Found:
case HttpStatus_SeeOther:
case HttpStatus_TemporaryRedirect:
case HttpStatus_PermanentRedirect:
if (client->disable_auto_redirect) {
http_dispatch_event(client, HTTP_EVENT_REDIRECT, NULL, 0);
}

View File

@ -150,7 +150,9 @@ typedef enum {
HttpStatus_MultipleChoices = 300,
HttpStatus_MovedPermanently = 301,
HttpStatus_Found = 302,
HttpStatus_SeeOther = 303,
HttpStatus_TemporaryRedirect = 307,
HttpStatus_PermanentRedirect = 308,
/* 4xx - Client Error */
HttpStatus_BadRequest = 400,