Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"HTTPI tried to user the httpi adapter" error using Savon SOAP library

I am using Savon to write a Ruby interface to a SOAP service. It appears to be working, but I am getting a couple of DEBUG messages appearing on the command line

D, [2011-02-15T16:33:32.664620 #4140] DEBUG -- : HTTPI tried to use the httpclient adapter, but was unable to find the library in the LOAD_PATH. Falling back using the net_http adapter now.

D, [2011-02-15T16:33:32.820863 #4140] DEBUG -- : HTTPI executes HTTP POST using the net_http adapter

I am not sure why these messages are appearing, or what they even mean.

Any ideas?

like image 262
Dave Isaacs Avatar asked Feb 15 '11 21:02

Dave Isaacs


1 Answers

Savon uses HTTPI to execute HTTP requests. HTTPI acts as an adapter to various Ruby HTTP client libraries (it currently supports: HTTPClient, Curb and Net/HTTP). Before v0.9.0, HTTPI's default was to use HTTPClient, log a warning when the library could not be loaded and fall back to use NetHTTP.

As of v0.9.0, HTTPI now tries to load HTTPClient, then Curb and finally NetHTTP without logging the "fallback warning".

Like you mentioned, it still logs the adapter used for each request. You could either raise the default log level of your app to something like :info (HTTPI logs at :debug) or tell HTTPI to not log anything at all via:

HTTPI.log = false

Ps. Please note that disabling the logging for v0.8.0 is buggy. This was fixed with v0.9.0.

like image 169
rubiii Avatar answered Oct 10 '22 15:10

rubiii