vendor/bundle/ruby/2.7.0/gems/octokit-4.20.0/lib/octokit/middleware/follow_redirects.rb
# HTTP methods for which 30x redirects can be followed
HTTP methods for which 30x redirects can be followed
HTTP methods for which 30x redirects can be followed
def perform_with_redirection(env, follows)
        request_body = env[:body]
        response = @app.call(env)
        response.on_complete do |response_env|
          if follow_redirect?(response_env, response)
            raise(RedirectLimitReached, response) if follows.zero?
            new_request_env = update_env(response_env, request_body, response)
            response = perform_with_redirection(new_request_env, follows - 1)
          end
        end
        response
      end
def perform_with_redirection ( env , follows ) request_body = env [ :body ] response = @app . call ( env ) response . on_complete do | response_env | if follow_redirect? ( response_env , response ) raise ( RedirectLimitReached , response ) if follows . zero? new_request_env = update_env ( response_env , request_body , response ) response = perform_with_redirection ( new_request_env , follows - 1 ) end end response end
HTTP methods for which 30x redirects can be followed
HTTP methods for which 30x redirects can be followed
env
<not_specific>
follows
<not_specific>