Register FFI methods and HTTP routes for one wire prefix.
For each tuple calls add and Request.add_class (one method/sig pair). Put wire name and handler on the routes( line; each following line is one route. Tuple order: path, verb, method, sig, request_type, response_type. Repeat until path is null. Sig letters match Request.add_class ("" = no extra args).
OLLMrpc.Http.routes("Alarm", typeof(Service),
"/v1/alarms/{id}", "GET", "get", "s", typeof(void), typeof(void),
"/v1/alarms", "POST", "create", "o", typeof(AlarmCreate), typeof(Alarm)
);
| name |
wire object prefix (e.g. Alarm) |
| type |
handler GType |
| ... |
path, verb, method, sig, request_type, response_type (repeat; end with null path) |
| GLib.IOError.EXISTS |
when a verb+path is repeated |