Falcon.SugarApi/Falcon.SugarApi/ApiClient/ApiClientOptions.cs

28 lines
730 B
C#

using Microsoft.Extensions.Options;
namespace Falcon.SugarApi.ApiClient
{
/// <summary>
/// api客户端配置
/// </summary>
public class ApiClientOptions:IOptions<ApiClientOptions>
{
/// <summary>
/// 配置对象
/// </summary>
public ApiClientOptions Value => this;
/// <summary>
/// 客户端请求超时。秒
/// </summary>
public int ClientTimeout { get; set; } = 10;
/// <summary>
/// 媒体类型
/// </summary>
public string MediaType { get; set; } = "application/json";
/// <summary>
/// 保持链接
/// </summary>
public bool KeepAlive { get; set; }=true;
}
}