AnthropicAwsFetch
Namespace: Vercel.AI.Anthropic
public static class AnthropicAwsFetchClaude Platform on AWS fetch behavior. GET and POST requests without a body skip signing.
POST bodies are signed for service aws-external-anthropic.
Inheritance: object
Fields
Section titled “Fields”Service
Section titled “Service”public const string Service = "aws-external-anthropic"SigV4 service name.
Value: string
UserAgent
Section titled “UserAgent”public static readonly string UserAgentUser agent sent on every AWS request. The runtime segment is dotnet.
Value: string
Methods
Section titled “Methods”Prepare(string, string?, string?, byte[]?, JsonNode?, IReadOnlyDictionary<string, string?>?, IReadOnlyDictionary<string, string?>?, AnthropicAwsCredentials, DateTimeOffset?)
Section titled “Prepare(string, string?, string?, byte[]?, JsonNode?, IReadOnlyDictionary<string, string?>?, IReadOnlyDictionary<string, string?>?, AnthropicAwsCredentials, DateTimeOffset?)”public static AnthropicAwsPreparedCall Prepare(string url, string? method, string? body, byte[]? binaryBody, JsonNode? objectBody, IReadOnlyDictionary<string, string?>? headers, IReadOnlyDictionary<string, string?>? requestHeaders, AnthropicAwsCredentials credentials, DateTimeOffset? utcNow = null)Prepares a call. Non-POST requests and POST requests without a body are not signed. String bodies are left unchanged. Byte bodies are decoded as UTF-8. Other objects are JSON.
Parameters
| Name | Type | Description |
|---|---|---|
url |
string | |
method |
string | |
body |
string | |
binaryBody |
byte[] | |
objectBody |
JsonNode | |
headers |
IReadOnlyDictionary<string, string> | |
requestHeaders |
IReadOnlyDictionary<string, string> | |
credentials |
AnthropicAwsCredentials | |
utcNow |
DateTimeOffset? |
Returns: AnthropicAwsPreparedCall
PrepareApiKey(string, string, string?, string?, IReadOnlyDictionary<string, string?>?)
Section titled “PrepareApiKey(string, string, string?, string?, IReadOnlyDictionary<string, string?>?)”public static AnthropicAwsPreparedCall PrepareApiKey(string apiKey, string url, string? method, string? body, IReadOnlyDictionary<string, string?>? headers)Adds x-api-key and the AWS user-agent without signing.
The API key replaces any caller-supplied x-api-key.
Parameters
| Name | Type | Description |
|---|---|---|
apiKey |
string | |
url |
string | |
method |
string | |
body |
string | |
headers |
IReadOnlyDictionary<string, string> |
Returns: AnthropicAwsPreparedCall
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product