esp_http_server: Add some response error code, such as 401, 403 etc.

Closes https://github.com/espressif/esp-idf/issues/5466
This commit is contained in:
Liu Han
2020-11-30 11:23:35 +08:00
committed by bot
parent 4605a8ac80
commit 669d9820fc
2 changed files with 19 additions and 0 deletions

View File

@@ -540,6 +540,17 @@ typedef enum {
*/
HTTPD_400_BAD_REQUEST,
/* This response means the client must authenticate itself
* to get the requested response.
*/
HTTPD_401_UNAUTHORIZED,
/* The client does not have access rights to the content,
* so the server is refusing to give the requested resource.
* Unlike 401, the client's identity is known to the server.
*/
HTTPD_403_FORBIDDEN,
/* When requested URI is not found */
HTTPD_404_NOT_FOUND,