Safe Haskell | None |
---|
- module Network.HTTP.QueryString
- type Method = ByteString
- type Endpoint = ByteString
- type Path = ByteString
- type SecretKey = ByteString
- data SignatureMethod = HmacSHA256
- stringToSign :: Method -> Endpoint -> Path -> [(ByteString, ByteString)] -> ByteString
- stringToSign' :: Method -> Endpoint -> Path -> QueryString -> ByteString
- signature :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> [(ByteString, ByteString)] -> ByteString
- signature' :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> QueryString -> ByteString
Re-exports
module Network.HTTP.QueryString
Types
type Method = ByteStringSource
type Endpoint = ByteStringSource
type Path = ByteStringSource
type SecretKey = ByteStringSource
Building signature
stringToSign :: Method -> Endpoint -> Path -> [(ByteString, ByteString)] -> ByteStringSource
Make a string for making signature.
>>>
stringToSign "GET" "ec2.amazonaws.com" "/" [("key1", "value1"), ("key2", "value2")]
"GET\nec2.amazonaws.com\n/\nkey1=value1&key2=value2"
stringToSign' :: Method -> Endpoint -> Path -> QueryString -> ByteStringSource
signature :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> [(ByteString, ByteString)] -> ByteStringSource
Make signature from a parameter list.
signature' :: Method -> Endpoint -> Path -> SecretKey -> SignatureMethod -> QueryString -> ByteStringSource
Make signature from a QueryString
.