class X::RedirectHandler

Overview

Handles HTTP redirects

Defined in:

x/redirect_handler.cr

Constant Summary

DEFAULT_MAX_REDIRECTS = 10

Constructors

Instance Method Summary

Constructor Detail

def self.new(authenticator : X::BearerTokenAuthenticator | X::OauthAuthenticator, connection : X::Connection, request_builder : X::RequestBuilder, max_redirects : Int32 = DEFAULT_MAX_REDIRECTS) #

[View source]

Instance Method Detail


[View source]
def authenticator=(authenticator : BearerTokenAuthenticator | OauthAuthenticator) #

[View source]
def connection : Connection #

[View source]
def connection=(connection : Connection) #

[View source]
def handle_redirects(response : HTTP::Client::Response, original_request : HTTP::Request, original_base_url : URI, redirect_count : Int32 = 0) #

[View source]
def max_redirects : Int32 #

[View source]
def max_redirects=(max_redirects : Int32) #

[View source]
def request_builder : RequestBuilder #

[View source]
def request_builder=(request_builder : RequestBuilder) #

[View source]