Module Fetch

type body
type bodyInit
type headers
type headersInit
type response
type request
type requestInit
type arrayBuffer
type bufferSource
type formData
type readableStream
type urlSearchParams
type abortController
type signal

File API

type blob
type file
type requestMethod =
  1. | Get
  2. | Head
  3. | Post
  4. | Put
  5. | Delete
  6. | Connect
  7. | Options
  8. | Trace
  9. | Patch
  10. | Other of string
module AbortController : sig ... end
type referrerPolicy =
  1. | None
  2. | NoReferrer
  3. | NoReferrerWhenDowngrade
  4. | SameOrigin
  5. | Origin
  6. | StrictOrigin
  7. | OriginWhenCrossOrigin
  8. | StrictOriginWhenCrossOrigin
  9. | UnsafeUrl
type requestType =
  1. | None
  2. | Audio
  3. | Font
  4. | Image
  5. | Script
  6. | Style
  7. | Track
  8. | Video
type requestDestination =
  1. | None
  2. | Document
  3. | Embed
  4. | Font
  5. | Image
  6. | Manifest
  7. | Media
  8. | Object
  9. | Report
  10. | Script
  11. | ServiceWorker
  12. | SharedWorker
  13. | Style
  14. | Worker
  15. | Xslt
type requestMode =
  1. | Navigate
  2. | SameOrigin
  3. | NoCORS
  4. | CORS
type requestCredentials =
  1. | Omit
  2. | SameOrigin
  3. | Include
type requestCache =
  1. | Default
  2. | NoStore
  3. | Reload
  4. | NoCache
  5. | ForceCache
  6. | OnlyIfCached
type requestRedirect =
  1. | Follow
  2. | Error
  3. | Manual
module HeadersInit : sig ... end
module Headers : sig ... end
module BodyInit : sig ... end
module Body : sig ... end
module RequestInit : sig ... end
module Request : sig ... end
module Response : sig ... end
module FormData : sig ... end
val fetch : string -> response Js.Promise.t
val fetchWithInit : string -> requestInit -> response Js.Promise.t
val fetchWithRequest : request -> response Js.Promise.t
val fetchWithRequestInit : request -> requestInit -> response Js.Promise.t