summaryrefslogtreecommitdiffhomepage
path: root/HTTP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'HTTP.hs')
-rw-r--r--HTTP.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/HTTP.hs b/HTTP.hs
index ac4eeab..13a7bda 100644
--- a/HTTP.hs
+++ b/HTTP.hs
@@ -66,9 +66,15 @@ instance FromJSON ProofOfWorkRequirement
instance FromHttpApiData ProofOfWork where
parseUrlPiece = Right . ProofOfWork
+instance ToHttpApiData ProofOfWork where
+ toUrlPiece (ProofOfWork t) = t
+
instance FromHttpApiData StorableObjectIdent where
parseUrlPiece = Right . StorableObjectIdent . T.encodeUtf8
+instance ToHttpApiData StorableObjectIdent where
+ toUrlPiece (StorableObjectIdent b) = T.decodeUtf8 b
+
instance MimeRender OctetStream StorableObject where
mimeRender _ = L.fromStrict . toByteString