Create a new HTTP connector.
Optionaloptions: HttpConnectorOptionsOptional configuration. See HttpConnectorOptions.
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 the server to respond with HTTP 206 Partial Content. Any 2xx response is also accepted for compatibility with servers that ignore Range headers and return the full body.
Fully qualified HTTP(S) URL to the FGB resource.
Zero-based byte offset to begin reading from.
Number of bytes to read.
The requested byte range.
Read multiple byte ranges from the same HTTP(S) URL.
Each range is fetched as a separate HTTP Range Request. Requests are dispatched through a worker pool limited to HttpConnectorOptions.maxConcurrency concurrent fetches. 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.
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. Multi-range reads are throttled to HttpConnectorOptions.maxConcurrency concurrent requests to avoid overwhelming the origin.
Example