networking · beginner · ~15 min
Validate against the common HTTP methods.
Implement int is_http_method(const char *m) returning 1 for GET, POST, PUT, DELETE, HEAD, else 0.
#include <string.h>
int is_http_method(const char *m) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.