Mercurial
comparison seobeo/s_web.c @ 78:e7bf9e002850
amend
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Wed, 31 Dec 2025 15:07:43 -0800 |
| parents | c348ac875294 |
| children | 5710108c949e |
comparison
equal
deleted
inserted
replaced
| 77:c348ac875294 | 78:e7bf9e002850 |
|---|---|
| 136 void *p_path_kv = Dowa_HashMap_Get_Ptr(p_req_map, "Path"); | 136 void *p_path_kv = Dowa_HashMap_Get_Ptr(p_req_map, "Path"); |
| 137 const char *path = p_path_kv ? ((Seobeo_Request_Entry*)p_path_kv)->value : "/"; | 137 const char *path = p_path_kv ? ((Seobeo_Request_Entry*)p_path_kv)->value : "/"; |
| 138 | 138 |
| 139 // --- Try to match API route first --- | 139 // --- Try to match API route first --- |
| 140 Seobeo_Route_Handler handler = Seobeo_Router_Find_Handler(method, path, &p_req_map, p_request_arena); | 140 Seobeo_Route_Handler handler = Seobeo_Router_Find_Handler(method, path, &p_req_map, p_request_arena); |
| 141 | |
| 142 if (handler != NULL) | 141 if (handler != NULL) |
| 143 { | 142 { |
| 144 // Call the API handler | |
| 145 Seobeo_Request_Entry *p_response_map = handler(p_req_map, p_response_arena); | 143 Seobeo_Request_Entry *p_response_map = handler(p_req_map, p_response_arena); |
| 146 | |
| 147 // Send the response | |
| 148 Seobeo_Router_Send_Response(p_cli_handle, p_response_map, p_response_arena); | 144 Seobeo_Router_Send_Response(p_cli_handle, p_response_map, p_response_arena); |
| 149 goto clean_up; | 145 goto clean_up; |
| 150 } | 146 } |
| 151 | 147 |
| 152 // --- Handle different HTTP methods (static files fallback) --- | 148 // --- Handle different HTTP methods (static files fallback) --- |