Hi Patrick,
For your use-case, I'd probably recommend an option that's not very well documented (yet): you can stack entrypoint decorators
of course, this is slightly tricky with the current http and rpc decorators, since they have different method signatures, but this, in turn is easily fixed and will probably benefit a project like yours anyway:
See, the bundled http extension is built to be completely generic, but if you are hosting an api on top of nameko, you probably have conventions around parameters and return values. so, if you subclass the `HttpRequestHandler` and override `get_entrypoint_parameters`, `response_from_result` (and probably `response_from_exception` you can have an @my_http_api entrypoint decorator with the same signature as the @rpc decorator
then your service can just be
class Service:
@my_http_api
@rpc
def my_method(self, param1, param2)
do_stuff()
for the entrypoint subclass, e.g. for `get_entrypoint_parameters`, instead of passing in the `request` object and parameters from your url, you might mandate the parameters be sent as a json document in the request body, and pull those values out and return as kwargs (similar to what the @rpc entrypoint does).
Best,
David