createHttpProviderFactory
function createHttpProviderFactory(options?: HttpProviderOptions): ProviderFactory;Defined in: src/providers/web/HttpProvider.ts:106
Creates a provider factory backed by HTTP(S) GET/HEAD.
Read-only by design - use it to fetch artifacts from public URLs, signed
URLs, or HTTP-only artifact servers. Range-based resume is supported when
the server advertises Accept-Ranges: bytes. To upload to an HTTP endpoint,
use the WebDAV provider, the S3 provider, or a cloud-specific provider.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options | HttpProviderOptions | Optional id, base path, secure flag, fetch override. |
Returns
Section titled “Returns”Provider factory suitable for createTransferClient({ providers: [...] }).
Examples
Section titled “Examples”import { createHttpProviderFactory, createTransferClient, downloadFile } from "@zero-transfer/sdk";
const client = createTransferClient({ providers: [createHttpProviderFactory()] });
await downloadFile({ client, localPath: "./tmp/release.tar.gz", source: { path: "/releases/v1.0.0/release.tar.gz", profile: { host: "downloads.example.com", provider: "http" }, },});await downloadFile({ client, localPath: "./reports/today.json", source: { path: "/reports/today.json", profile: { host: "api.example.com", provider: "http", password: { env: "REPORTS_TOKEN" }, }, },});