Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data RedirectChain
- newtype RedirectChainLink = RedirectChainLink {}
- emptyChain :: RedirectChain
- pushRequest :: RedirectChain -> RedirectChainLink -> RedirectChain
- hasRequest :: RedirectChain -> RedirectChainLink -> Bool
- totalFollowed :: RedirectChain -> Int
- data RedirectRule = RedirectRule {}
- data RedirectRuleOn
- data RedirectRuleOutcome
- redirectRule :: Text -> Text -> Int -> [RedirectRule] -> Maybe RedirectRule
- isPermanentRedirectCode :: Int -> Bool
- isRedirectCode :: Int -> Bool
- isTemporaryRedirectCode :: Int -> Bool
Documentation
data RedirectChain Source #
Links in a redirection chain.
Instances
Show RedirectChain Source # | |
Defined in Xrefcheck.Data.Redirect showsPrec :: Int -> RedirectChain -> ShowS # show :: RedirectChain -> String # showList :: [RedirectChain] -> ShowS # | |
Buildable RedirectChain Source # | |
Defined in Xrefcheck.Data.Redirect build :: RedirectChain -> Builder # | |
Eq RedirectChain Source # | |
Defined in Xrefcheck.Data.Redirect (==) :: RedirectChain -> RedirectChain -> Bool # (/=) :: RedirectChain -> RedirectChain -> Bool # | |
FromList RedirectChain Source # | |
Defined in Xrefcheck.Data.Redirect type ListElement RedirectChain # type FromListC RedirectChain # fromList :: [ListElement RedirectChain] -> RedirectChain # | |
type FromListC RedirectChain Source # | |
Defined in Xrefcheck.Data.Redirect | |
type ListElement RedirectChain Source # | |
Defined in Xrefcheck.Data.Redirect |
newtype RedirectChainLink Source #
A single link in a redirection chain.
Instances
Show RedirectChainLink Source # | |
Defined in Xrefcheck.Data.Redirect showsPrec :: Int -> RedirectChainLink -> ShowS # show :: RedirectChainLink -> String # showList :: [RedirectChainLink] -> ShowS # | |
Eq RedirectChainLink Source # | |
Defined in Xrefcheck.Data.Redirect (==) :: RedirectChainLink -> RedirectChainLink -> Bool # (/=) :: RedirectChainLink -> RedirectChainLink -> Bool # |
hasRequest :: RedirectChain -> RedirectChainLink -> Bool Source #
totalFollowed :: RedirectChain -> Int Source #
data RedirectRule Source #
A custom redirect rule.
RedirectRule | |
|
Instances
data RedirectRuleOn Source #
Rule selector depending on the response HTTP code.
RROCode Int | An exact HTTP code |
RROPermanent | Any HTTP code considered as permanent according to |
RROTemporary | Any HTTP code considered as permanent according to |
Instances
FromJSON RedirectRuleOn Source # | |
Defined in Xrefcheck.Data.Redirect parseJSON :: Value -> Parser RedirectRuleOn # parseJSONList :: Value -> Parser [RedirectRuleOn] # | |
Show RedirectRuleOn Source # | |
Defined in Xrefcheck.Data.Redirect showsPrec :: Int -> RedirectRuleOn -> ShowS # show :: RedirectRuleOn -> String # showList :: [RedirectRuleOn] -> ShowS # | |
Eq RedirectRuleOn Source # | |
Defined in Xrefcheck.Data.Redirect (==) :: RedirectRuleOn -> RedirectRuleOn -> Bool # (/=) :: RedirectRuleOn -> RedirectRuleOn -> Bool # |
data RedirectRuleOutcome Source #
What to do when receiving a redirect HTTP response.
RROValid | Consider it as valid |
RROInvalid | Consider it as invalid |
RROFollow | Try again by following the redirect |
Instances
FromJSON RedirectRuleOutcome Source # | |
Defined in Xrefcheck.Data.Redirect | |
Show RedirectRuleOutcome Source # | |
Defined in Xrefcheck.Data.Redirect showsPrec :: Int -> RedirectRuleOutcome -> ShowS # show :: RedirectRuleOutcome -> String # showList :: [RedirectRuleOutcome] -> ShowS # | |
Eq RedirectRuleOutcome Source # | |
Defined in Xrefcheck.Data.Redirect (==) :: RedirectRuleOutcome -> RedirectRuleOutcome -> Bool # (/=) :: RedirectRuleOutcome -> RedirectRuleOutcome -> Bool # |
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.
isPermanentRedirectCode :: Int -> Bool Source #
isRedirectCode :: Int -> Bool Source #
isTemporaryRedirectCode :: Int -> Bool Source #