async-http-faraday icon indicating copy to clipboard operation
async-http-faraday copied to clipboard

Stuck on some sites

Open CyJimmy264 opened this issue 5 months ago • 1 comments

  class Otc
      def conn
        @conn ||= Faraday.new(url: 'https://www.htx.com') do |builder|
          builder.adapter :async_http, timeout: 60
          builder.request :json
          builder.response :json
        end
      end

      def payment_systems_request
        @payment_systems_request ||=
          conn.get('/-/x/otc/v1/data/config-list', { type: 'currency,marketQuery,pay,allCountry,coin' }).body
      end
  end
[1] pry(main)> hb = Otc.new
[2] pry(main)> hb.send(:payment_systems_request)
Faraday::TimeoutError: execution expired (Faraday::TimeoutError)

But it is actually ok with other sites. Can not find out which side to dig from. It's also ok with default adapter.

CyJimmy264 avatar Aug 19 '25 08:08 CyJimmy264