(Migrated) Internally invoking restful services

(This message has been automatically imported from the retired mailing list)

Hello -

One more question for the group. Let’s suppose that I have a restful
service that I’ve built where I specifically have different behaviors
depending on the http verb/method.

I have a second service that should call the first service using the invoke
method
https://zato.io/docs/progguide/service-dev.html#progguide-write-service-invoke
of the Service class. Is there a way to specify the http verb or do I have
to pass the information through the environ as an alternative?

Thanks as always,
David

David Schenz
davidschenz@gmail.com
513-429-8884

On 24/02/16 01:56, David Schenz wrote:

Hello -

One more question for the group. Let’s suppose that I have a restful
service that I’ve built where I specifically have different behaviors
depending on the http verb/method.

I have a second service that should call the first service using the
invoke method
https://zato.io/docs/progguide/service-dev.html#progguide-write-service-invoke
of the Service class. Is there a way to specify the http verb or do I
have to pass the information through the environ as an alternative?

Hi David,

in your case I would move the actual logic to another service that both
the REST and the new one would invoke using self.invoke.

This is inevitable in bigger projects anyway - and in fact in larger
environments services are designed in the three-layers architecture of
input, core and adapter ones right from the very beginning.