@@ -40,7 +40,7 @@ import JS.Fetch.RequestMode as Mode
4040import JS.Fetch.Response as Resp
4141import Promise.Aff as Promise
4242import Type.Row.Homogeneous (class Homogeneous)
43−import Yoga.HTTP.API.Route.Encoding (PlainText)
43+-- PlainText removed, using local phantom type
4444import Yoga.JSON (class ReadForeign, class WriteForeign, readJSON_, writeJSON)
4545import Yoga.Om (Om, fromAff, throw)
4646
@@ -52,7 +52,9 @@ class DecodeResponse :: forall k. k -> Type -> Constraint
5252class DecodeResponse a result | a -> result where
5353 decodeResponse :: String -> Maybe result
5454
55−instance DecodeResponse (PlainText String) String where
55+data PlainTextResponse
56+
57+instance DecodeResponse PlainTextResponse String where
5658 decodeResponse = Just
5759
5860else instance ReadForeign a => DecodeResponse a a where
@@ -145,7 +147,7 @@ delete_
145147 => Record headers
146148 -> String
147149 -> Om ctx (fetchError :: FetchError | err) Unit
148−delete_ headers url = void $ simpleFetch @(PlainText String) DELETE headers url Nothing
150+delete_ headers url = void $ simpleFetch @PlainTextResponse DELETE headers url Nothing
149151
150152post
151153 :: forall @a result headers body ctx err
@@ -177,7 +179,7 @@ post_
177179 -> String
178180 -> body
179181 -> Om ctx (fetchError :: FetchError | err) Unit
180−post_ headers url body = void $ simpleFetch @(PlainText String) POST headers url (Just (writeJSON body))
182+post_ headers url body = void $ simpleFetch @PlainTextResponse POST headers url (Just (writeJSON body))
181183
182184put
183185 :: forall @a result headers body ctx err
@@ -209,7 +211,7 @@ put_
209211 -> String
210212 -> body
211213 -> Om ctx (fetchError :: FetchError | err) Unit
212−put_ headers url body = void $ simpleFetch @(PlainText String) PUT headers url (Just (writeJSON body))
214+put_ headers url body = void $ simpleFetch @PlainTextResponse PUT headers url (Just (writeJSON body))
213215
214216patch
215217 :: forall @a result headers body ctx err
@@ -241,4 +243,4 @@ patch_
241243 -> String
242244 -> body
243245 -> Om ctx (fetchError :: FetchError | err) Unit
244−patch_ headers url body = void $ simpleFetch @(PlainText String) PATCH headers url (Just (writeJSON body))
246+patch_ headers url body = void $ simpleFetch @PlainTextResponse PATCH headers url (Just (writeJSON body))