hoauth-0.3.5: A Haskell implementation of OAuth 1.0a protocol.

Safe HaskellSafe
LanguageHaskell98

Network.OAuth.Http.PercentEncoding

Description

Percent encoding http://tools.ietf.org/html/rfc3986#page-12 functions, with the exception that all encoding/decoding is in UTF-8.

Synopsis

Documentation

class PercentEncoding a where Source

Methods

encode :: a -> String Source

Encodes a type into its percent encoding representation.

decode :: String -> Maybe (a, String) Source

Decodes a percent-encoded type to its native type.

Instances

PercentEncoding Char Source

Encodes Char types using UTF-8 charset.

PercentEncoding Word8 Source 
PercentEncoding a => PercentEncoding [a] Source 

decodeWithDefault :: PercentEncoding a => a -> String -> a Source

Decodes a percent encoded string. In case of failure returns a default value, instead of Nothing.