TsgcHTTP_API_Anthropic › 属性 › TLSOptions
配置用于与 Anthropic API 进行 HTTPS 连接的 TLS/SSL 层。
property TLSOptions: TsgcHTTPTLS_Options read GetTLSOptions
write FTLSOptions;
—
TLSOptions 控制在向 https://api.anthropic.com/v1 建立 HTTPS 连接时使用的 TLS 库(OpenSSL 或 SChannel)、协议版本和证书验证策略。Anthropic 端点要求 TLS 1.2 或更高版本,除非有特定的互操作性需求,否则请保留默认设置。此处也可配置自定义根证书或双向 TLS。
oAPI := TsgcHTTP_API_Anthropic.Create(nil);
oAPI.TLSOptions.OpenSSL_Options.APIVersion := oslAPI_1_1;
oAPI.TLSOptions.MinVersion := tls1_2;
oAPI.TLSOptions.VerifyCertificate := True;