riak-0.4.0.0: A Haskell client for the Riak decentralized data store

Portabilityportable
Stabilityexperimental
MaintainerBryan O'Sullivan <bos@mailrank.com>

Network.Riak.Escape

Description

Support for REST-safe name handling.

Riak's protocol buffer (PBC) API will accept unescaped bucket, link, and key names. Its REST API does not unescape names, so it is possible to use the PBC API to construct names that cannot be accessed via the REST API (e.g. containing an embedded slash or other URL-unsafe octet).

Synopsis

Documentation

class Escape e whereSource

The class of string-like types that can be URL-escaped and unescaped.

Methods

escape :: e -> ByteStringSource

URL-escape a string.

unescape' :: ByteString -> Either String eSource

URL-unescape a string.

unescape :: Escape e => ByteString -> eSource

URL-unescape a string that is presumed to be properly escaped. If the string is invalid, an error will be thrown that cannot be caught from pure code.