- = ResourceDef {
- resUsesNativeThread = False
- , resIsGreedy = False
- , resGet
- = Just $ do setContentType $ read "text/plain"
- outputChunk "getRemoteCertificate = "
- cert <- do c <- getRemoteCertificate
- case c of
- Just c -> liftIO $ printX509 c
- Nothing -> return "Nothing"
- outputChunk cert
- , resHead = Nothing
- , resPost = Nothing
- , resPut = Nothing
- , resDelete = Nothing
+ = emptyResource {
+ resGet
+ = Just $ do setContentType $ parseMIMEType "text/plain"
+ putChunk "getRemoteCertificate = "
+ cert ← do cert ← getRemoteCertificate
+ case cert of
+ Just c → liftIO $ Lazy.pack <$> printX509 c
+ Nothing → return "Nothing"
+ putChunks cert