DownloadRequest
Namespace: Vercel.AI.Util
public sealed class DownloadRequestOptions passed to a download fetch implementation.
Inheritance: object
Constructors
Section titled “Constructors”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 |
Properties
Section titled “Properties”AbortSignal
Section titled “AbortSignal”public CancellationToken AbortSignal { get; }Cancellation signal for the attempt.
Value: CancellationToken
public byte[]? Body { get; set; }Request body, or null for none.
Value: byte[]
Headers
Section titled “Headers”public HeaderCollection Headers { get; }Request headers.
Value: HeaderCollection
MaxBytes
Section titled “MaxBytes”public long MaxBytes { get; set; }Largest body the fetch may read. The default fetch stops reading past it.
Value: long
Method
Section titled “Method”public string Method { get; set; }HTTP method. Defaults to GET.
Value: string
Redirect
Section titled “Redirect”public string Redirect { get; }manual, follow, or error.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product