Respond to POSTs as well as GETs in /cm handler (#900)

* add method to parse args from body instead of just url

* Allow /cm to POST and PUT as well as GET

* forgot to ensure didn't misparse non GET/PUT/POST in /cm requests

---------

Co-authored-by: Tim Connors <tconnors@rather.puzzling.org>
This commit is contained in:
Tim Connors
2023-08-16 16:15:48 +10:00
committed by GitHub
parent a5cf6b3440
commit e130cfddbe
3 changed files with 27 additions and 10 deletions

View File

@ -67,6 +67,7 @@ int postany(http_request_t* request, const char* str, int len);
void misc_formatUpTimeString(int totalSeconds, char* o);
// void HTTP_AddBuildFooter(http_request_t *request);
// void HTTP_AddHeader(http_request_t *request);
int http_getRawArg(const char* base, const char* name, char* o, int maxSize);
int http_getArg(const char* base, const char* name, char* o, int maxSize);
int http_getArgInteger(const char* base, const char* name);