Support PUT, DELETE, and HEAD methods in cofigs.

The primary usecase for this is RESTful APIs where PUT, DELETE, and HEAD can be useful methods to support.
This commit is contained in:
Geenz 2015-04-08 19:46:27 -04:00
parent 81c3325677
commit 2b907545ca
1 changed files with 6 additions and 0 deletions

View File

@ -703,6 +703,12 @@ configure_params(char **argv)
current_method = HTTP_METHOD_POST;
} else if (!strcasecmp(argv[1], "get")) {
current_method = HTTP_METHOD_GET;
} else if (!strcasecmp(argv[1], "put")) {
current_method = HTTP_METHOD_PUT;
} else if (!strcasecmp(argv[1], "delete")) {
current_method = HTTP_METHOD_DELETE;
} else if (!strcasecmp(argv[1], "head")) {
current_method = HTTP_METHOD_HEAD;
} else {
printf("unknown method: %s in params block for %s\n",
argv[1], argv[2]);