0

there is one transaction from the client that need to call multiple API's from the microservices. so i'm thinking can ocelot handle the logic that if that request was sent to ocelot, ocelot can route it into those multiple API's.

i don't want to create another service just to combine those multiple API's calls. is it possible for ocelot to handle the needs?

i expect that ocelot can have it own logic or its own controller so when the client send request to ocelot, ocelot can determine which API's it need to send request to.

example:

i want to do 'Add User', but in 'Add User' i need to store user data and a profile picture.

the profile picture and user data has different microservices that proccess them.

so from the client side call ocelot, then ocelot direct it to user microservices and the profile picture microservices

ocelot: https://localhost:7004/ocelot/AddUser

it routes to

User Microservices: https://localhost:5031/api/adduserdata Photo Microservices: https://localhost:5031/api/addphoto

4
  • Yes, it has options to merge requests and responses with a limited flexibility and for only get requests. Commented Sep 7, 2023 at 12:03
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Commented Sep 8, 2023 at 6:59
  • What is the request URL difference you want ocelot to distinguish?Could you give some example? Commented Sep 8, 2023 at 9:26
  • I don't thinks it's possible. Ocelot is gateway. Posting content cannot be tear apart using it. Commented Sep 11, 2023 at 8:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.