class Cossack::RedirectionMiddleware

Overview

Follows 3xx redirects.

Cossack::Client.new do |client|
  # follow up to 10 redirects (by default 5)
  client.use Cossack::RedirectionMiddleware, limit: 10
end

Defined in:

cossack/middleware/redirection_middleware.cr

Constructors

Instance Method Summary

Instance methods inherited from class Cossack::Middleware

__set_app__(app : Cossack::Connection | Cossack::Middleware | Cossack::Request -> Cossack::Response) __set_app__, app : Cossack::Connection | Cossack::Middleware | Cossack::Request -> Cossack::Response app, call(request : Request) : Response call

Constructor methods inherited from class Cossack::Middleware

new(app : Cossack::Connection | Cossack::Middleware | Cossack::Request -> Cossack::Response) new

Constructor Detail

def self.new(app, limit : Number = 5) #

[View source]

Instance Method Detail

def call(request : Request) : Response #

[View source]