PrepareHeaders
Namespace: Vercel.AI.Util
public static class PrepareHeadersFills default headers without replacing headers the caller already set.
Inheritance: object
Methods
Section titled “Methods”Apply(HeaderCollection?, IReadOnlyDictionary<string, string>?)
Section titled “Apply(HeaderCollection?, IReadOnlyDictionary<string, string>?)”public static HeaderCollection Apply(HeaderCollection? headers, IReadOnlyDictionary<string, string>? defaultHeaders)Copies <code class=“paramref”>headers</code> and sets each default that is not already present. Header names are compared case-insensitively.
Parameters
| Name | Type | Description |
|---|---|---|
headers |
HeaderCollection | |
defaultHeaders |
IReadOnlyDictionary<string, string> |
Returns: HeaderCollection
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product