Fix #1462 - add helper function for getting HTTP response status code.

This commit is contained in:
Sergey Lyubka committed 2022-02-12 16:51:37 +00:00
1 parent 1adf7f6b2b
commit da72dafbfb
5 files changed
+21

No files matched your search

+4
View File
@@ -905,6 +905,10 @@ int mg_http_upload(struct mg_connection *c, struct mg_http_message *hm,
}
}
int mg_http_status(const struct mg_http_message *hm) {
return atoi(hm->uri.ptr);
}
static void http_cb(struct mg_connection *c, int ev, void *evd, void *fnd) {
if (ev == MG_EV_READ || ev == MG_EV_CLOSE) {
struct mg_http_message hm;