Package

purescript-ezfetch

Repository
cakekindel/purescript-ezfetch
License
GPL-3.0-or-later
Uploaded by
pacchettibotti
Published on
2024-11-23T19:50:18Z

High-level bindings to the native fetch API

Effect.Aff.HTTP

The main entry point is Effect.Aff.HTTP.fetch:

fetch <method> <url> <options>
  • <method> is Effect.Aff.HTTP.Request.Method:

    data Method
      = GET
      | PUT
      | POST
      | DELETE
      | PATCH
      | HEAD
  • <url> is Data.URL.URL (from url-immutable)

  • <options> is a partial record of:

    type OptionalFields =
      ( body :: Body
      , headers :: Headers
      , credentials :: Credentials
      )