Burgyn / MMLib.SwaggerForOcelot

This repo contains swagger extension for ocelot.
MIT License
352 stars 94 forks source link

HttpClientFactory Dynamic Configuration #189

Closed thomas-illiet closed 3 years ago

thomas-illiet commented 3 years ago

Hello Guys,

Many thanks for this project, can you implement the static or dynamic HttpClientFactory configuration in the following class DownstreamSwaggerDocsRepository ?

I need this to able to set the proxy configuration for backend API.

Thanks Thomas

request-info[bot] commented 3 years ago

We would appreciate it if you could provide us with more info about this issue/pr!

Burgyn commented 3 years ago

Hi,

Thank you for the suggestion. I'll look into it later this week.

Burgyn commented 3 years ago

Hi @thomas-illiet,

What exactly do you need to configure? Will it be enough if you can create your own HttpClientHandler?

For example, like this:

services.AddSwaggerForOcelot(Configuration, (c) =>
{
    c.ConfigureHttpMessageHandler(()=> 
      new HttpClientHandler() { 
         Proxy = httpProxy 
      });
});
github-actions[bot] commented 3 years ago

Closing after 8 days of waiting for the additional info requested.