0
http://test.com/abc/xyz/1/2/3
のようなURLを指定すると、abc/
の後にすべてのURLセグメントを取得すると、結果の値は["xyz","1","2","3]
になりますか?複数のURLパラメータ/セグメントを取得する方法は?
processParams :: String -> Request -> Maybe [Param]
processParams s x = do
case (params', isPrefix) of
(_:paramsxs, True) -> return $ fmap (flip (,) $ "") paramsxs
_ -> Nothing
where
isPrefix = s `isPrefixOf` (convertString path) :: Bool
path = rawPathInfo x
params' = fmap convertString $ decodePathSegments path
そしてfunction
機能を使用して::ケース誰に