Getting HttpClient for downstream path #1868
mbendtsen
started this conversation in
Show and tell
Replies: 1 comment
-
Hi Michael! Do you have an intention to discuss your code further? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there anyway for me to get and HttpClient based on a path?
I want to build an aggregator (the builtin functionality is not enough) where one POST is calling 3 services, like Facade pattern.
I tried using a custom controller, but couldn't get it to map to the controller. Ocelot kept saying there was no route for the request.
So I digged into DelegateHandlers which could work. I'm using ServiceDiscovery with Kubernetes and I thought why not let Ocelot give me an HttpClient based on the path I want to call.
This is what I got so far, which is probably a big hack. Any ideas? This doesn't work. It doesn't find the right route, and the HttpClientBuilder does not set the base url.
Beta Was this translation helpful? Give feedback.
All reactions