uploadAsset
    :: Session
    -> ByteString
    -> RawFilePath
    -> Text
    -> IO (Response LB.ByteString)
uploadAsset session token path url = B.readFile path >>=
    postWith (opts token) session uploadURL
  where
    name = (snd $ B.breakEnd (== '/') path) <> "_" <> releaseSuffix
    uploadURL = B.unpack $ mconcat
        [T.encodeUtf8 $ T.takeWhile (/= '{') url, "?name=", name]
uploadAsset
    :: Session
    -> ByteString
    -> RawFilePath
    -> Text
    -> IO (Response LB.ByteString)
uploadAsset session token path url = B.readFile path >>=
    postWith (opts token) session uploadURL
  where
    name = (snd $ B.breakEnd (== '/') path) <> "_" <> releaseSuffix
    uploadURL = B.unpack $ mconcat
        [T.encodeUtf8 $ T.takeWhile (/= '{') url, "?name=", name]
uploadAsset session token path url = B.readFile path >>=
    postWith (opts token) session uploadURL
  where
    name = (snd $ B.breakEnd (== '/') path) <> "_" <> releaseSuffix
    uploadURL = B.unpack $ mconcat
        [T.encodeUtf8 $ T.takeWhile (/= '{') url, "?name=", name]