Dave Isaacs
Dave Isaacs

Reputation: 4539

"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?

Upvotes: 6

Views: 4105

Answers (2)

rubiii
rubiii

Reputation: 6983

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.

Upvotes: 14

Dave Isaacs
Dave Isaacs

Reputation: 4539

Aaaand, 30 second later I figure it out for myself. Just install the HTTPClient adapter.

Though I am still getting the following DEBUG message

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

Any ideas on how to suppress it?

Thanks!

Upvotes: 0

Related Questions