xrefcheck-0.3.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Xrefcheck.Data.Redirect

Synopsis

Documentation

data RedirectChain Source #

Links in a redirection chain.

newtype RedirectChainLink Source #

A single link in a redirection chain.

data RedirectRule Source #

A custom redirect rule.

Constructors

RedirectRule 

Fields

Instances

Instances details
FromJSON RedirectRule Source # 
Instance details

Defined in Xrefcheck.Data.Redirect

Generic RedirectRule Source # 
Instance details

Defined in Xrefcheck.Data.Redirect

Associated Types

type Rep RedirectRule :: Type -> Type #

type Rep RedirectRule Source # 
Instance details

Defined in Xrefcheck.Data.Redirect

data RedirectRuleOn Source #

Rule selector depending on the response HTTP code.

Constructors

RROCode Int

An exact HTTP code

RROPermanent

Any HTTP code considered as permanent according to isPermanentRedirectCode

RROTemporary

Any HTTP code considered as permanent according to isTemporaryRedirectCode

data RedirectRuleOutcome Source #

What to do when receiving a redirect HTTP response.

Constructors

RROValid

Consider it as valid

RROInvalid

Consider it as invalid

RROFollow

Try again by following the redirect

redirectRule :: Text -> Text -> Int -> [RedirectRule] -> Maybe RedirectRule Source #

Redirect rule to apply to a link when it has been responded with a given HTTP code.