Register one HTTP route under a verb.
Does not call Request.add_class. Use when the method/sig is already registered, or for a late/test-only path. Prefer routes from service rpc_register(). A trailing /{id} is stripped from the stored path and sets Route.variable (optional id on that one method).
OLLMrpc.Request.add_class("Alarm", typeof(Service), "ping", "");
OLLMrpc.Http.add("Alarm", typeof(Service),
"/v1/alarms/ping", "GET", "ping", typeof(void), typeof(void)
);
| wire_name |
wire object prefix (e.g. Alarm) |
| handler |
handler GType (same as add_class) |
| path |
path key (e.g. /v1/alarms or /v1/alarms/{id}) |
| verb |
HTTP verb (GET, POST, …) |
| method_name |
short method (e.g. get) |
| request_type |
body GType, or typeof(void) |
| response_type |
retval GType |
| GLib.IOError.EXISTS |
when verb+path is already registered |