Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Fetch/Internal/RequestBody.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Fetch.Internal.RequestBody where

import Data.ArrayBuffer.Types (ArrayBuffer, ArrayView, Uint8Array)
import JS.Fetch.RequestBody as CoreRequestBody
import Web.File.Blob (Blob)
import Web.Streams.ReadableStream (ReadableStream)

class ToRequestBody body where
Expand All @@ -13,6 +14,9 @@ instance ToRequestBody ArrayBuffer where
instance ToRequestBody (ArrayView a) where
toRequestBody = CoreRequestBody.fromArrayView

instance ToRequestBody Blob where
toRequestBody = CoreRequestBody.fromBlob

instance ToRequestBody String where
toRequestBody = CoreRequestBody.fromString

Expand Down
Loading