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> LiveStream

True marks a streamed answer (VapixRequestOptions.StreamResponse) as a live stream that runs as long as the plugin reads it, such as an MJPEG stream of pictures (SDK 0.10.0). Through a site it takes none of the site’s large transfer slots, which AXIS OS upgrades, application installs and exports need: a live stream would hold one for as long as it runs. A plugin that sets it limits its own streams per site. A large request body still takes a slot.

const string LiveStreamKey = "Oadm.LiveStream"

Name of the VapixRequestOptions.LiveStream option.

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.