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
parent b436132f9f
commit 98c2132498
2 changed files with 4 additions and 0 deletions

View File

@ -824,7 +824,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:
esp_http_client_set_redirection(client);
client->redirect_counter ++;
client->process_again = 1;

View File

@ -149,7 +149,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,