Module
Axios
- Package
- purescript-axios
- Repository
- iarthstar/purescript-axios
#genericAxios Source
genericAxios :: forall res req. Decode res => Encode req => String -> Array Config -> req -> Aff (Either Error res)
A generic implementation of the axios
member from Axios
class
i.e. takes an url, array of config and request body and gives the Either
Error
response
genericAxios "/req_res/users/9"
[ method GET
, headers [ Header "Content-Type" "application/json" ]
, baseUrl "https://grandeur-backend.herokuapp.com"
, auth "1234" "1234"
] req
#defaultAxios Source
defaultAxios :: forall res req. Decode res => Encode req => String -> Method -> req -> Aff (Either Error res)
A default implementation of the axios
member from Axios
class
i.e. takes an url, method and request body and gives the Either
Error
response
defaultAxios "https://grandeur-backend.herokuapp.com/gh_api/get_release_info/" POST req
#defaultAxios' Source
defaultAxios' :: forall res req. Decode res => Encode req => String -> Method -> Array Header -> req -> Aff (Either Error res)
Another default implementation of the axios
member from Axios
class
i.e. takes an url, method, array of header and request body and gives the Either
Error
response
defaultAxios' "https://reqres.in/api/users/7" PATCH
[ Header "Content-Type" "application/json"]
, Header "Cache-Control" "no-cache"]
] req
- Modules
- Axios