Skip to content

Follow redirects #58

Closed
Closed
@dblock

Description

@dblock

I think hyperclient should by default follow redirects, which means adding to

faraday.adapter :net_http
:

        faraday.use FaradayMiddleware::FollowRedirects

Currently monkey-patching

require 'hyperclient/entry_point'

module Hyperclient
  class EntryPoint < Link
    def default_faraday_block
      lambda do |faraday|
        faraday.use FaradayMiddleware::FollowRedirects
        faraday.request  :json
        faraday.response :json, content_type: /\bjson$/
        faraday.adapter :net_http
      end
    end
  end
end

Thoughts?

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