docs: readme

This commit is contained in:
orion 2024-06-10 12:23:09 -05:00
parent 38675aac33
commit 5eca91d2dd
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -8,23 +8,36 @@ The main entry point is `Effect.Aff.HTTP.fetch`:
fetch <method> <url> <options> fetch <method> <url> <options>
``` ```
* `<method>` is `Effect.Aff.HTTP.Request.Method`: <ul>
<li>
<!-- language: purescript --> `<method>` is `Effect.Aff.HTTP.Request.Method`:
data Method
= GET
| PUT
| POST
| DELETE
| PATCH
| HEAD
* `<url>` is `Data.URL.URL` (from [`url-immutable`](https://pursuit.purescript.org/packages/purescript-url-immutable/)) ```purescript
* `<options>` is a partial record of: data Method
= GET
| PUT
| POST
| DELETE
| PATCH
| HEAD
```
</li>
<!-- language: purescript --> <li>
type OptionalFields =
( body :: Body `<url>` is `Data.URL.URL` (from [`url-immutable`](https://pursuit.purescript.org/packages/purescript-url-immutable/))
, headers :: Headers </li>
, credentials :: Credentials <li>
)
`<options>` is a partial record of:
```purescript
type OptionalFields =
( body :: Body
, headers :: Headers
, credentials :: Credentials
)
```
</li>
</ul>