一键导入
fetcher-integration
// Use when setting up the core Fetcher HTTP client, NamedFetcher, fetcherRegistrar, HTTP methods, path and query parameters, interceptors, timeouts, result extractors, request lifecycle, status validation, or URL templates.
// Use when setting up the core Fetcher HTTP client, NamedFetcher, fetcherRegistrar, HTTP methods, path and query parameters, interceptors, timeouts, result extractors, request lifecycle, status validation, or URL templates.
Use when implementing CoSec authentication with Fetcher, including CoSecConfigurer, JWT token lifecycle, token storage, refresh handling, device ID storage, multi-tenant space resolution, resource attribution, authorization headers, and 401 or 403 error handling.
Use when creating declarative TypeScript API service classes with fetcher-decorator, including @api, HTTP method decorators, path/query/header/body/request parameters, result extractors, lifecycle hooks, inheritance, and reflect-metadata setup.
Use when implementing typed event buses, serial or parallel event execution, BroadcastChannel or storage-based cross-tab messaging, handler priority, once handlers, name generation, or event synchronization across browser contexts.
Use when consuming Server-Sent Events, LLM token streams, OpenAI-style streaming chat responses, Fetcher eventstream helpers, response prototype extensions, stream termination detection, result extractors, or ReadableStream async iteration.
Use when calling OpenAI Chat Completions through Fetcher, configuring OpenAI or ChatClient, sending streaming or non-streaming chat completion requests, adding interceptors, using completion result extractors, or handling OpenAI client errors.
Use when generating type-safe Fetcher API clients from OpenAPI 3.x specs, including fetcher-generator CLI usage, CodeGenerator API, GeneratorConfiguration, parse and generation pipeline, model generation, client generation, barrel exports, and Wow CQRS generation support.
| name | fetcher-integration |
| description | Use when setting up the core Fetcher HTTP client, NamedFetcher, fetcherRegistrar, HTTP methods, path and query parameters, interceptors, timeouts, result extractors, request lifecycle, status validation, or URL templates. |
@ahoo-wang/fetcher before reaching for higher-level packages.NamedFetcher when the client will be reused by decorators, generated clients, or app services.FetchExchange inside interceptors; do not return a replacement exchange from intercept().ResultExtractors when callers need typed values instead of raw Response objects.references/api.md for exact method signatures, lifecycle order, or full examples.urlParams.path for template variables and urlParams.query for query strings.validateStatus or IGNORE_VALIDATE_STATUS intentionally when non-2xx responses are part of the domain flow.references/api.md: Detailed package API, examples, and edge-case guidance. Load it only when the task needs method signatures, interceptor ordering, URL parameter examples, error hierarchy, and complete service setup examples.