TsgcHTTP_API_Anthropic属性 › TLSOptions

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;

返回属性