You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`req`|`MiddlewareRequest`| A standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) with `schemaPath` (OpenAPI pathname) and `params` ([params](/openapi-fetch/api#fetch-options) object) |
127
-
|`options`|`MergedOptiosn`| Combination of [createClient](/openapi-fetch/api#create-client) options + [fetch overrides](/openapi-fetch/api#fetch-options)|
127
+
|`options`|`MergedOptions`| Combination of [createClient](/openapi-fetch/api#create-client) options + [fetch overrides](/openapi-fetch/api#fetch-options)|
To learn more about `onRequest()` and `onResponse()`[see the API](/api#middleware)
37
+
36
38
::: tip
37
39
38
40
The order in which middleware are registered matters. For requests, `onRequest()` will be called in the order registered. For responses, `onResponse()` will be called in **reverse** order. That way the first middleware gets the first “dibs” on requests, and the final control over responses.
|`req`|`MiddlewareRequest`| A standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) with `schemaPath` (OpenAPI pathname) and `params` ([params](/openapi-fetch/api#fetch-options) object) |
55
-
|`options`|`MergedOptiosn`| Combination of [createClient](/openapi-fetch/api#create-client) options + [fetch overrides](/openapi-fetch/api#fetch-options)|
56
-
57
-
And it expects either:
58
-
59
-
-**If modifying the request:** A [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request)
0 commit comments