Create a new HTTP connector.
Optionaloptions: HttpConnectorOptions
Optional configuration. See HttpConnectorOptions.
ReadonlycacheURLs identify resources globally, given the same request headers.
ReadonlyhintsOptional tuning hints for the pipeline.
No-op for the HTTP connector.
The built-in fetch API does not maintain persistent connections
that require explicit cleanup. This method exists to satisfy the
Connector interface contract.
Resolves immediately.
Read a contiguous byte range from an HTTP(S) URL using a
Range: bytes=offset-(offset+length-1) request header.
Expects HTTP 206 Partial Content starting at offset (checked against
Content-Range when present). Other outcomes:
Range) → accepted only for reads from
offset 0 whose full body fits within length; otherwise a
RangeNotSupportedError, because every later read would
silently download the whole file.ETag (or Last-Modified) differs from
ReadOptions.ifMatch, or 412 Precondition Failed (with
conditionalRequests) → SourceChangedError.Content-Range → retried; a server that
returns less than requested (a cap on range sizes) is asked for the
rest.Fully qualified HTTP(S) URL to the FGB resource.
Zero-based byte offset to begin reading from.
Number of bytes to read.
Optionaloptions: ReadOptions
Optional version check and abort signal.
The requested byte range; shorter than length if the
resource ends first.
Read the first length bytes together with the resource size (from
Content-Range, or a HEAD request when the server reports *) and
version tag (ETag, or Last-Modified without one).
Fully qualified HTTP(S) URL to the FGB resource.
Number of leading bytes to read.
Optionaloptions: ReadOptions
Optional abort signal.
The leading bytes plus size and version tag.
Read multiple byte ranges from the same HTTP(S) URL.
Each range is fetched as a separate HTTP Range Request, subject to the connector-wide HttpConnectorOptions.maxConcurrency limit. When one range fails, the others are cancelled. Results are returned in the same order as the input ranges.
Fully qualified HTTP(S) URL to the FGB resource.
Array of { offset, length } byte-range descriptors.
Optionaloptions: ReadOptions
Optional version check and abort signal, applied to every range.
Array of Uint8Array chunks in the same order as the input ranges.
Returns an empty array when ranges is empty.
HTTP(S) connector using the Node.js built-in
fetch(Node 18+) with HTTP Range Requests.Suitable for any HTTP endpoint that supports partial content responses: static file servers, CDNs, cloud storage with pre-signed URLs, etc. Requests are limited to HttpConnectorOptions.maxConcurrency in flight across all reads of the connector, to avoid overwhelming the origin.
Example