首先我会给你代码,然后是错误,然后是一些类型信息。问题是:我怎样才能弄清楚发生了什么?我该如何解决这个问题?
readTask = do
req' <- parseUrl "https://10.64.251.32/rest/api/latest/issue/BNAP-291"
manager <- newManager manSettings
let req'' = applyBasicAuth (pack "sandboxer") (pack "sandboxer") req'
Response _ _ _ body <-runResourceT $ http req'' manager
pBody <- runResourceT $
body $$+- sinkParser json
-- print pBody
-- closeManager manager
return ()
where manSettings =
def
{ managerCheckCerts = \ _ _ -> return CertificateUsageAccept }
这编译得很好。这是我运行编译后的代码时发生的情况
dist/build/Spike/Spike
Spike: <socket: 3>: hGetBuf: illegal operation (handle is closed)
body
是以下类型
Data.Conduit.Internal.ResumableSource
(Control.Monad.Trans.Resource.ResourceT IO)
Data.ByteString.Internal.ByteString
感谢反馈,我不知道如何开始解决此问题。