purescript-fetch/README.md
2024-06-10 12:19:25 -05:00

736 B

purescript-ezfetch

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:

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

  • <options> is a partial record of:

      <!-- language: purescript -->
      type OptionalFields =
        ( body :: Body
        , headers :: Headers
        , credentials :: Credentials
        )