Skip to content

Commit 771b03f

Browse files
committed
openapi-fetch: provide API docs for Request parameter
1 parent 35b4509 commit 771b03f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/openapi-fetch/api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ createClient<paths>(options);
1717
| :---------------- | :-------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
1818
| `baseUrl` | `string` | Prefix all fetch URLs with this option (e.g. `"https://myapi.dev/v1/"`) |
1919
| `fetch` | `fetch` | Fetch instance used for requests (default: `globalThis.fetch`) |
20+
| `Request` | `Request` | Request constructor used for requests (default: `globalThis.Request`) |
2021
| `querySerializer` | QuerySerializer | (optional) Provide a [querySerializer](#queryserializer) |
2122
| `bodySerializer` | BodySerializer | (optional) Provide a [bodySerializer](#bodyserializer) |
2223
| (Fetch options) | | Any valid fetch option (`headers`, `mode`, `cache`, `signal` …) ([docs](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) |
@@ -36,8 +37,9 @@ client.GET("/my-url", options);
3637
| `querySerializer` | QuerySerializer | (optional) Provide a [querySerializer](#queryserializer) |
3738
| `bodySerializer` | BodySerializer | (optional) Provide a [bodySerializer](#bodyserializer) |
3839
| `parseAs` | `"json"` \| `"text"` \| `"arrayBuffer"` \| `"blob"` \| `"stream"` | (optional) Parse the response using [a built-in instance method](https://developer.mozilla.org/en-US/docs/Web/API/Response#instance_methods) (default: `"json"`). `"stream"` skips parsing altogether and returns the raw stream. |
39-
| `baseUrl` | `string` | Prefix the fetch URL with this option (e.g. `"https://myapi.dev/v1/"`) |
40+
| `baseUrl` | `string` | Prefix the fetch URL with this option (e.g. `"https://myapi.dev/v1/"`) |
4041
| `fetch` | `fetch` | Fetch instance used for requests (default: fetch from `createClient`) |
42+
| `Request` | `Request` | Request constructor used for requests (default: Request from `createClient`) |
4143
| `middleware` | `Middleware[]` | [See docs](/openapi-fetch/middleware-auth) |
4244
| (Fetch options) | | Any valid fetch option (`headers`, `mode`, `cache`, `signal`, …) ([docs](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options)) |
4345

0 commit comments

Comments
 (0)