mirror of https://git.kore.io/kore.git
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:
parent
81c3325677
commit
2b907545ca
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue