Skip to content

VapixRequestOptions

Static class in Oadm.Sdk.Vapix · Oadm.Sdk.dll

Per-request options understood by IVapixClient.SendAsync. Set them on HttpRequestMessage.Options.

public static class VapixRequestOptions

Guide: Devices and VAPIX

static readonly HttpRequestOptionsKey<bool> StreamResponse

True returns the response as soon as its headers arrived, without buffering the body: read it with HttpContent.ReadAsStreamAsync (e.g. straight into a file) and dispose the response. The 16 MB answer limit of the buffered mode does not apply, so the caller enforces its own limit while it reads, and VapixRequestOptions.Timeout covers only the time until the headers: bound the body read with your own token. For large read-only downloads such as server reports: request.Options.Set(VapixRequestOptions.StreamResponse, true).

const string StreamResponseKey = "Oadm.StreamResponse"

Name of the VapixRequestOptions.StreamResponse option.

static readonly HttpRequestOptionsKey<TimeSpan> Timeout

Overrides the default request timeout (15 s) for one request, e.g. 20 minutes for a firmware or ACAP upload: request.Options.Set(VapixRequestOptions.Timeout, TimeSpan.FromMinutes(20)). The timeout covers sending the body and reading the response. Request bodies are streamed, never buffered by the client (use StreamContent for large files). Timeout.InfiniteTimeSpan disables it.

const string TimeoutKey = "Oadm.RequestTimeout"

Name of the VapixRequestOptions.Timeout option.