Safe Haskell | None |
---|
- data Request = HTTP {}
- data HTTPMethod
- type Parameter = (String, Maybe String)
- class PercentEncoding a where
- encode :: a -> ByteString
- encodes :: [a] -> ByteString
- decode :: ByteString -> (a, ByteString)
- decodes :: ByteString -> [a]
- nonce_and_timestamp :: Request -> IO Request
- append_param :: Request -> (String, Maybe String) -> Request
- show_url :: Request -> ByteString
- show_oauthurl :: Request -> ByteString
- show_oauthheader :: String -> Request -> ByteString
- show_urlencoded :: [Parameter] -> ByteString
- read_urlencoded :: ByteString -> [Parameter]
- (>>+) :: Request -> (String, Maybe String) -> Request
Documentation
The HTTP request which must be properly authenticated with oauth. It is not meant to represent the full HTTP request, instead the data which matters for oauth authentication.
data HTTPMethod Source
The possible HTTP methods
class PercentEncoding a whereSource
Refer to http://en.wikipedia.org/wiki/Percent-encoding for more information
encode :: a -> ByteStringSource
Encodes an a type to bytestring.
encodes :: [a] -> ByteStringSource
Encodes a list of a types into bytestring.
decode :: ByteString -> (a, ByteString)Source
Decodes a single a type out of an encoded string.
decodes :: ByteString -> [a]Source
Decodes the whole string into a list of a types.
nonce_and_timestamp :: Request -> IO RequestSource
Generates the oauth_nonce and oauth_timestamp parameters.
append_param :: Request -> (String, Maybe String) -> RequestSource
Convenience function to append an item in request's parameters list
show_url :: Request -> ByteStringSource
Show the entire url, including possibly any oauth parameter which may be present.
show_oauthurl :: Request -> ByteStringSource
The URL to perform the oauth request
:: String | The realm |
-> Request | |
-> ByteString | The Authorization/WWW-Authenticate header |
The Authorization or WWW-Authenticated headers to perform oauth authentication.
show_urlencoded :: [Parameter] -> ByteStringSource
Produces a urlencoded string. For convenience, it sorts the parameters first, as demands the oauth protocol.
read_urlencoded :: ByteString -> [Parameter]Source
Parses a urlencoded string.