calcSignature :: B.ByteString -> Request -> B.ByteString -> B.ByteString
calcSignature authtoken r rb = let 
    rootUrl = maybe "" id (getApprootMay r)
    url' = url rootUrl r
    requestbody' = case requestMethod r of
            "POST" -> postParams rb
            _ -> ""
    in
    signature authtoken (url' <> requestbody')
calcSignature :: B.ByteString -> Request -> B.ByteString -> B.ByteString
calcSignature authtoken r rb = let 
    rootUrl = maybe "" id (getApprootMay r)
    url' = url rootUrl r
    requestbody' = case requestMethod r of
            "POST" -> postParams rb
            _ -> ""
    in
    signature authtoken (url' <> requestbody')
calcSignature authtoken r rb = let 
    rootUrl = maybe "" id (getApprootMay r)
    url' = url rootUrl r
    requestbody' = case requestMethod r of
            "POST" -> postParams rb
            _ -> ""
    in
    signature authtoken (url' <> requestbody')