feat: add HEAD

This commit is contained in:
orion 2024-04-21 17:17:28 -05:00
parent 589a8b0eec
commit aa6b8b811f
Signed by: orion
GPG Key ID: 6D4165AE4C928719
5 changed files with 6386 additions and 1 deletions

View File

@ -1,3 +1,3 @@
bun 1.0.11 bun 1.0.11
purescript 0.15.12 purescript 0.15.12
nodejs 20.9.0 nodejs 21.6.2

6382
spago.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@ fetch req = do
Req.POST -> "POST" Req.POST -> "POST"
Req.PATCH -> "PATCH" Req.PATCH -> "PATCH"
Req.DELETE -> "DELETE" Req.DELETE -> "DELETE"
Req.HEAD -> "HEAD"
headers' = Object.fromFoldableWithIndex headers headers' = Object.fromFoldableWithIndex headers
liftAff $ Promise.toAffE $ fetchImpl url methodStr headers' $ Nullable.toNullable bodyRaw liftAff $ Promise.toAffE $ fetchImpl url methodStr headers' $ Nullable.toNullable bodyRaw

View File

@ -35,6 +35,7 @@ fetchProxy pxy req = do
Req.POST -> "POST" Req.POST -> "POST"
Req.PATCH -> "PATCH" Req.PATCH -> "PATCH"
Req.DELETE -> "DELETE" Req.DELETE -> "DELETE"
Req.HEAD -> "HEAD"
headers' = Object.fromFoldableWithIndex headers headers' = Object.fromFoldableWithIndex headers
liftAff $ Promise.toAffE $ fetchImpl pxy url methodStr headers' $ Nullable.toNullable bodyRaw liftAff $ Promise.toAffE $ fetchImpl pxy url methodStr headers' $ Nullable.toNullable bodyRaw

View File

@ -111,6 +111,7 @@ data Method
| POST | POST
| DELETE | DELETE
| PATCH | PATCH
| HEAD
derive instance Generic Method _ derive instance Generic Method _
instance Eq Method where instance Eq Method where