← Back to Usage Guide Index
Sub‑TOC for the core public APIs of m7Fetch. Each entry links to a dedicated page with full method signatures, options, return shapes, and examples.
1) NET
- The top‑level hub that composes the subsystems: HTTP, Specs, Modules, and Batch.
- Covers constructor options, lifecycle, and how to pass defaults down to subsystems.
2) HTTP
- Request helpers:
get,post,put,patch,delete,head,options. - Request options (base URL, headers,
json/urlencoded,timeout,signal). - Response formats:
body|full|raw. - Roadmap slots: HTTP/2, streaming, retries/backoff.
3) SPEC_MANAGER
specs.load(source, opts)andspecs.call(apiId, operationId, args).- Parameter groups (
path,query,headers,body) and format passthrough. - Multiple specs, IDs/namespacing, and operation resolution.
4) AUTOLOADER
- Type inference and dispatch for spec loading (e.g.,
x-type). - GET/POST retrieval and option forwarding to HTTP.
- Extending with custom loaders.
5) MODULES
modules.load(id, url)returns the module namespace (dynamicimport()).- Registry semantics, caching, and invalidation patterns.
6) BATCH_LOADER
batch.run(loadList, onLoad, onFail, { awaitAll, limit }).- Item schema, handler contract (only
falsemarks failure). - Context storage (
context[id]), concurrency limits, and result maps.
7) SYNC_LOADER
- Minimal coordinator used by BatchLoader.
require(ids),wrapper(id, handler),loaded/failed/success.- Callback rules and polling patterns.
- Enumerated/validated fetch option sets (e.g.,
mode,cache,credentials,referrerPolicy). - How validation interacts with
HTTP.FETCH_DEFAULTS.
- Shapes for HTTP responses (by
format) and batch results. - Recommended typings/JSDoc for public methods.
- Future:
.d.tsbundles.
10) ERRORS
- Error taxonomy and codes (e.g.,
E_BATCH_DUP_ID,E_HTTP_UNSUPPORTED_METHOD). - Guidance for structured logs and observability.
11) EXTENSIBILITY
- Custom batch handlers, HTTP debug hooks, and spec loader extensions.
- Integration points for metrics/telemetry.
- API stability policy, deprecation paths, and migration notes.
- BASIC_CONCEPTS.md — narrative overview of how pieces fit together.
- HTTP_GUIDE.md — deeper guidance on requests/responses.
- BATCHING_AND_COORDINATION.md — patterns & recipes.