From b2c8c9d9ab1cfaaf833f7e6ad318505df9a9ec36 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Tue, 22 Aug 2023 12:30:21 +0200 Subject: rest: support DELETE HTTP request method Reuse endpoints in order to add deletion operation such as "/server". This way there is no need to declare a different if/else block in order to parse a new URI for the new "*/delete" endpoint. Current deletion operations are implemented using a different endpoint name such as "/client/delete", "/center/delete" with POST request method. Endpoints using "/delete" suffix may not be removed for backwards compatibility. Adding HTTP method DELETE support for endpoints such as "/center" or "/client" can use the already existing *_post_delete* functions. --- src/rest.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rest.h') diff --git a/src/rest.h b/src/rest.h index d146868..6120a4e 100644 --- a/src/rest.h +++ b/src/rest.h @@ -87,6 +87,7 @@ int og_client_state_process_payload_rest(struct og_client *cli); enum og_rest_method { OG_METHOD_GET = 0, OG_METHOD_POST, + OG_METHOD_DELETE, OG_METHOD_NO_HTTP }; -- cgit v1.2.3-18-g5258