add UrlOptions sum type
This commit is contained in:
parent
fdc7200b25
commit
003fc2b7e1
14 changed files with 78 additions and 65 deletions
|
@ -121,10 +121,10 @@ findDownloads u = go =<< downloadFeed u
|
|||
downloadFeed :: URLString -> Annex (Maybe Feed)
|
||||
downloadFeed url = do
|
||||
showOutput
|
||||
ua <- Url.getUserAgent
|
||||
uo <- Url.getUrlOptions
|
||||
liftIO $ withTmpFile "feed" $ \f h -> do
|
||||
fileEncoding h
|
||||
ifM (Url.download url [] [] f ua)
|
||||
ifM (Url.download url f uo)
|
||||
( parseFeedString <$> hGetContentsStrict h
|
||||
, return Nothing
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue