git.iko.soy/typeable/bloodhound
on master help sign in
Merge pull request #91 from Soostone/request-hook
194582dChris Allen
src/Database/Bloodhound/Client.hs+3−3
@@ -310,11 +310,11 @@ deepMerge = LS.foldl' go mempty
310 merge _ b = b
310 merge _ b = b
311
311
312
312
313−statusCodeIs :: Int -> Reply -> Bool
313+statusCodeIs :: (Int, Int) -> Reply -> Bool
314−statusCodeIs n resp = NHTS.statusCode (responseStatus resp) == n
314+statusCodeIs r resp = inRange r $ NHTS.statusCode (responseStatus resp)
315
315
316respIsTwoHunna :: Reply -> Bool
316respIsTwoHunna :: Reply -> Bool
317−respIsTwoHunna = statusCodeIs 200
317+respIsTwoHunna = statusCodeIs (200, 299)
318
318
319existentialQuery :: MonadBH m => Text -> m (Reply, Bool)
319existentialQuery :: MonadBH m => Text -> m (Reply, Bool)
320existentialQuery url = do
320existentialQuery url = do