Safe Haskell | None |
---|---|
Language | Haskell2010 |
High-level functions for posting to 0bin services like http://0bin.net or http://paste.ec.
>>>
import Web.ZeroBin
>>>
import Data.ByteString.Char8
>>>
share "http://0bin.net" Day (pack "hello")
"http://0bin.net/paste/ZH6VyKXjDHAiPT8J#C6LLidGyHO7xt3xuDtsNHjZ77luualukEuJ25S6w/K1m"
- data Expiration
- data ZeroBinError = ZeroBinError String
- share :: String -> Expiration -> ByteString -> IO String
Documentation
data Expiration Source
Expiration of a paste.
"Burn after reading" really means "burn after two readings",
because we do not redirect to the paste like a browser does.
You can verify your paste before sharing the link.
Original http://0bin.net does not support Week
.
data ZeroBinError Source
0bin error message
:: String | the address of 0bin, e. g. http://0bin.net or https://paste.ec |
-> Expiration | |
-> ByteString | the plain data to encrypt and paste |
-> IO String | the URI of paste |
Encrypts the plain data with a random password,
post to 0bin and return the URI of a new paste.
Can throw ZeroBinError
or HttpException
.