git.iko.soy/typeable/http-api-data
on master help sign in
Replace uses for toUrlPiece and parseUrlPiece with toQueryParam and parseQueryParam.
97f200f(cdep)illabout
src/Web/HttpApiData/Internal/FormUrlEncoded.hs+2−2
@@ -88,7 +88,7 @@ instance {-# OVERLAPPABLE #-} (Selector sel, GToForm f)
88instance (ToHttpApiData f) => GToForm (K1 i f) where
88instance (ToHttpApiData f) => GToForm (K1 i f) where
89 gToForm (K1 a) = do
89 gToForm (K1 a) = do
90 s <- get
90 s <- get
91− return . Form $ M.insert (name s) (toUrlPiece a) $ mempty
91+ return . Form $ M.insert (name s) (toQueryParam a) $ mempty
92 where name (Nothing, i) = T.pack $ show i
92 where name (Nothing, i) = T.pack $ show i
93 name (Just x, _) = x
93 name (Just x, _) = x
94
94
@@ -127,7 +127,7 @@ instance (Selector sel, FromHttpApiData f)
127 => GFromForm (M1 S sel (K1 i f)) where
127 => GFromForm (M1 S sel (K1 i f)) where
128 gFromForm f = case M.lookup sel (unForm f) of
128 gFromForm f = case M.lookup sel (unForm f) of
129 Nothing -> Left . T.unpack $ "Could not find key " <> sel
129 Nothing -> Left . T.unpack $ "Could not find key " <> sel
130− Just v -> left T.unpack $ M1 . K1 <$> parseUrlPiece v
130+ Just v -> left T.unpack $ M1 . K1 <$> parseQueryParam v
131 where sel = T.pack $ selName (Proxy3 :: Proxy3 sel g p)
131 where sel = T.pack $ selName (Proxy3 :: Proxy3 sel g p)
132
132
133instance (GFromForm f) => GFromForm (M1 D x f) where
133instance (GFromForm f) => GFromForm (M1 D x f) where