phoet / asin

:books: :package: Amazon Simple INterface - Support for ItemLookup, SimilarityLookup, Search, BrowseNode and Cart Operations
http://asin.herokuapp.com/
167 stars 59 forks source link

Care required with dependent module versioning when using excon with httpi #34

Closed jackrg closed 10 years ago

jackrg commented 10 years ago

By default, httpi uses excon, but there can be version-related issues between these two libraries, causing Amazon to report that the Signature does not match. By changing to curb, this problem disappears. It may be the case that the correct combination of versions works, but I was not able to determine the correct combination. This can be done by adding 'require "curb"' prior to the 'require "asin"' command.

phoet commented 10 years ago

hi @jackrg

thx for reporting those issues. from what i know, HTTPI is adapter agnostic and does not favor one adapter over another. all dependencies are optional and it just "does the right thing"(:tm:) when you do not specify an adapter. if you don't want this behavior, go ahead and configure HTTPI to your needs. this is from my asin-web rails example application:

require 'httpi'
HTTPI.adapter = :curb
HTTPI.logger  = Rails.logger
jackrg commented 10 years ago

Thanks for the info.

On Mar 28, 2014, at 10:32 AM, Peter Schröder notifications@github.com wrote:

hi @jackrg

thx for reporting those issues. from what i know, HTTPI is adapter agnostic and does not favor one adapter over another. all dependencies are optional and it just "does the right thing"() when you do not specify an adapter. if you don't want this behavior, go ahead and configure HTTPI to your needs. this is from my asin-web rails example application:

require 'httpi' HTTPI.adapter = :curb HTTPI.logger = Rails.logger — Reply to this email directly or view it on GitHub.