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
docs: add functions.fetch() JSDoc and fix external link stripping
Add @example blocks and improved descriptions for the fetch() method.
Update invoke() to mention it uses POST and cross-reference fetch().
Fix removeNonExposedTypeLinks stripping external URLs (e.g. MDN links).
Add functions method ordering to method-order.json.
Made-with: Cursor
* - Access to raw response metadata (status, headers)
100
-
* - Direct control over request/response bodies
98
+
* Use `fetch()` when you need low-level control that {@linkcode invoke | invoke()} doesn't provide, such as:
99
+
* - Streaming responses, like SSE, chunked text, or NDJSON
100
+
* - Custom HTTP methods, like PUT, PATCH, or DELETE
101
+
* - Raw response access, including status codes, headers, and binary bodies
102
+
*
103
+
* @param path - Function path. Leading slash is optional, so `/chat` and `chat` are equivalent. For example, `'/streaming_demo'` or `'reports/export'`.
104
+
* @param init - Optional [`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit) options such as `method`, `headers`, `body`, and `signal`. Auth headers are added automatically.
105
+
* @returns Promise resolving to a native [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response).
0 commit comments