How do I explicitly set the timeout for an HTTP request via the Infrastructure HTTP Client?

How do I explicitly set the timeout for a HTTP request via our internal InfraHttpClient library (java)?

Best Answer

  • You set it in your http-client xml file. Point to the xml file in your local properties: app.config.fileName=myfunfilename-http-client-local.xml myfunfilename-http-client-local.xml will look like this:

Answers

  • Thanks Erik. I'll do that. I was hoping there was just a parameter on a constructor I was missing or something. But this will work.
  • That would be handy. I'm not aware of a way to set timeouts another way. BTW, I think you can use the asterisks (*) as part of the URL Pattern.
  • As a quick follow up for future reference, when you want to update these values for the deployed code, the config xml file is set in the http.client CMDB configuration property.