Skip to content

DownloadRequest

Namespace: Vercel.AI.Util

public sealed class DownloadRequest

Options passed to a download fetch implementation.

Inheritance: object

View source

DownloadRequest(HeaderCollection?, CancellationToken, string)

Section titled “DownloadRequest(HeaderCollection?, CancellationToken, string)”
public DownloadRequest(HeaderCollection? headers, CancellationToken abortSignal, string redirect)

Creates the request.

Parameters

Name Type Description
headers HeaderCollection
abortSignal CancellationToken
redirect string

View source

public CancellationToken AbortSignal { get; }

Cancellation signal for the attempt.

Value: CancellationToken

View source

public byte[]? Body { get; set; }

Request body, or null for none.

Value: byte[]

View source

public HeaderCollection Headers { get; }

Request headers.

Value: HeaderCollection

View source

public long MaxBytes { get; set; }

Largest body the fetch may read. The default fetch stops reading past it.

Value: long

View source

public string Method { get; set; }

HTTP method. Defaults to GET.

Value: string

View source

public string Redirect { get; }

manual, follow, or error.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product