Module
Yoga.Fetch.Om.Simple
- Package
- purescript-yoga-fetch-om
- Repository
- rowtype-yoga/purescript-yoga-fetch-om
#DecodeResponse Source
class DecodeResponse :: forall k. k -> Type -> Constraintclass DecodeResponse a result | a -> result where
Members
decodeResponse :: String -> Either String result
Instances
(ReadForeign a) => DecodeResponse a a
#FetchError Source
type FetchError = { body :: String, status :: Int }#FetchResponse Source
type FetchResponse a = { body :: a, headers :: Headers }#get Source
get :: forall @a result headers ctx err. DecodeResponse a result => Homogeneous headers String => String -> Record headers -> Om ctx (fetchError :: FetchError | err) result#getWithHeaders Source
getWithHeaders :: forall @a result headers ctx err. DecodeResponse a result => Homogeneous headers String => String -> Record headers -> Om ctx (fetchError :: FetchError | err) (FetchResponse result)#delete Source
delete :: forall @a result headers ctx err. DecodeResponse a result => Homogeneous headers String => String -> Record headers -> Om ctx (fetchError :: FetchError | err) result#deleteWithHeaders Source
deleteWithHeaders :: forall @a result headers ctx err. DecodeResponse a result => Homogeneous headers String => String -> Record headers -> Om ctx (fetchError :: FetchError | err) (FetchResponse result)#delete_ Source
delete_ :: forall headers ctx err. Homogeneous headers String => String -> Record headers -> Om ctx (fetchError :: FetchError | err) Unit#post Source
post :: forall @a result headers body ctx err. DecodeResponse a result => Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) result#postWithHeaders Source
postWithHeaders :: forall @a result headers body ctx err. DecodeResponse a result => Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) (FetchResponse result)#post_ Source
post_ :: forall headers body ctx err. Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) Unit#put Source
put :: forall @a result headers body ctx err. DecodeResponse a result => Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) result#putWithHeaders Source
putWithHeaders :: forall @a result headers body ctx err. DecodeResponse a result => Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) (FetchResponse result)#put_ Source
put_ :: forall headers body ctx err. Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) Unit#patch Source
patch :: forall @a result headers body ctx err. DecodeResponse a result => Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) result#patchWithHeaders Source
patchWithHeaders :: forall @a result headers body ctx err. DecodeResponse a result => Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) (FetchResponse result)#patch_ Source
patch_ :: forall headers body ctx err. Homogeneous headers String => WriteForeign body => String -> Record headers -> body -> Om ctx (fetchError :: FetchError | err) Unit