Request refused when calling external endpoint from cobalt module -- Proxy configuration InfraHttpCl

When calling an external api we need to send traffic through the proxy in order for it to work on the server (it will work fine locally). My question is, is it possible using the InfraHttpClient library (on a java module) to configure proxy settings for only a certain set of endpoints? We don't want our internal calls going through the proxy but the external ones need to.

Best Answer

  • As mentioned in the comment above, this is something that will hopefully be put into the InfraHttpClient code base at some point. For the time being, we have just implemented an "ExternalHttpClient" that configures a proxy connection to call to external services.

Answers

  • The Infrastructure team is working on an enhancement to both of the java http client jars to allow for configuration of the proxy on a per endpoint basis. In the mean time -- I have manually configured the apache http client to make requests through the proxy.