diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-20 17:59:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-20 17:59:14 -0400 |
commit | 7ed6961a0e0ef713c136a9d36f86bc7e31414dc5 (patch) | |
tree | 591fd6c5f60276c946962f8af27ec3def5d9b303 /HTTP.hs | |
parent | 3633c44893bfbd50f25b84ac353012975388332c (diff) | |
download | keysafe-7ed6961a0e0ef713c136a9d36f86bc7e31414dc5.tar.gz |
http client, and --server
Diffstat (limited to 'HTTP.hs')
-rw-r--r-- | HTTP.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |