Skip to content

Commit 41373b5

Browse files
Goosterhofclaude
andcommitted
docs(http): note that baseURL must be absolute in API Reference
One-liner clarification on the existing baseURL row of the createHttpService API Reference table. The library-attributed error message remains the primary documentation surface for the failure path; this is the static-page corollary so consumers reading the API table before writing the call site see the constraint up front. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c7bbc76 commit 41373b5

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/packages/http.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,14 @@ try {
199199

200200
### `createHttpService(baseURL, options?)`
201201

202-
| Parameter | Type | Description |
203-
| -------------------------- | ------------------------ | ----------------------------------------------------------------------- |
204-
| `baseURL` | `string` | Base URL for all requests |
205-
| `options.timeout` | `number \| undefined` | Request timeout in milliseconds (default: `30000`; pass `0` to disable) |
206-
| `options.headers` | `Record<string, string>` | Default headers |
207-
| `options.withCredentials` | `boolean` | Send cookies cross-origin (default: `true`) |
208-
| `options.withXSRFToken` | `boolean` | Include XSRF token (default: `false`) |
209-
| `options.smartCredentials` | `boolean` | Auto-toggle credentials by origin (default: `false`) |
202+
| Parameter | Type | Description |
203+
| -------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------- |
204+
| `baseURL` | `string` | Base URL for all requests. **Must be absolute** (e.g. `${location.origin}/api`); relative paths fail fast. |
205+
| `options.timeout` | `number \| undefined` | Request timeout in milliseconds (default: `30000`; pass `0` to disable) |
206+
| `options.headers` | `Record<string, string>` | Default headers |
207+
| `options.withCredentials` | `boolean` | Send cookies cross-origin (default: `true`) |
208+
| `options.withXSRFToken` | `boolean` | Include XSRF token (default: `false`) |
209+
| `options.smartCredentials` | `boolean` | Auto-toggle credentials by origin (default: `false`) |
210210

211211
### Constants
212212

0 commit comments

Comments
 (0)