File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ A robust and lightweight framework for buidling IoT APIs using the ESP32 chip. <
4
4
# Features
5
5
<ul >
6
6
<li >Auto Connect to WiFi using Smart Config.</li >
7
- <li >Base API with reset, OTA update functionality and error handlers .</li >
7
+ <li >Base API with reset, OTA update functionality.</li >
8
8
<li >HTTPS OTA updates.</li >
9
9
<li >API is secured using a client authentication key.</li >
10
10
<li >Extremely fast response times.</li >
@@ -77,8 +77,9 @@ void getDeviceInfo(AsyncWebServerRequest* request)
77
77
request->send(response);
78
78
79
79
} else {
80
- // Invalid auth key
81
- handleUnauthorizedRequest(request);
80
+ // Invalid or no Auth Key -> Unauthorized request
81
+ // handleRequest is defined in HttpResponseHandler.h
82
+ handleRequest(request, 401);
82
83
}
83
84
}
84
85
```
@@ -112,12 +113,6 @@ Params: <br>
112
113
<li><b>authkey:</b> Client Auth Key.</li>
113
114
</ul>
114
115
115
- # Base Error Handlers
116
- Defined in ErrorHandlers.h <br><br>
117
- <b> 200 </b> ```void handleSuccess(AsyncWebServerRequest* request); ```<br>
118
- <b> 400 </b> ```void handleBadRequest(AsyncWebServerRequest* request); ```<br>
119
- <b> 401 </b> ```void handleUnauthorizedRequest(AsyncWebServerRequest* request); ```<br>
120
- <b> 412 </b> ```void handlePreconditionFailed(AsyncWebServerRequest* request); ```<br>
121
116
122
117
# Security
123
118
<b>Please assess potential threats before using this library.</b> <br>
You can’t perform that action at this time.
0 commit comments