Class HttpOptions
HTTP options to be used in each of the requests.
public record HttpOptions : IEquatable<HttpOptions>
- Inheritance
-
HttpOptions
- Implements
- Inherited Members
Properties
ApiVersion
Specifies the version of the API to use.
[JsonPropertyName("apiVersion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ApiVersion { get; set; }
Property Value
BaseUrl
The base URL for the AI platform service endpoint.
[JsonPropertyName("baseUrl")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BaseUrl { get; set; }
Property Value
BaseUrlResourceScope
The resource scope used to constructing the resource name when base_url is set
[JsonPropertyName("baseUrlResourceScope")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ResourceScope? BaseUrlResourceScope { get; set; }
Property Value
Headers
Additional HTTP headers to be sent with the request.
[JsonPropertyName("headers")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, string>? Headers { get; set; }
Property Value
Timeout
Timeout for the request in milliseconds.
[JsonPropertyName("timeout")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Timeout { get; set; }
Property Value
- int?
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a HttpOptions object.
public static HttpOptions? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- HttpOptions
The deserialized HttpOptions object, or null if deserialization fails.