Skip to content

Stuck on some sites #59

@CyJimmy264

Description

@CyJimmy264
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions