forked from NpgsqlRest/NpgsqlRest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpClientOptions.cs
More file actions
47 lines (39 loc) · 1.7 KB
/
Copy pathHttpClientOptions.cs
File metadata and controls
47 lines (39 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
namespace NpgsqlRest;
public class HttpClientOptions
{
/// <summary>
/// Enable HTTP client functionality for annotated types.
/// </summary>
public bool Enabled { get; set; } = false;
/// <summary>
/// Default name for the response status code field within annotated types.
/// </summary>
public string ResponseStatusCodeField { get; set; } = "status_code";
/// <summary>
/// Default name for the response body field within annotated types.
/// </summary>
public string ResponseBodyField { get; set; } = "body";
/// <summary>
/// Default name for the response headers field within annotated types.
/// </summary>
public string ResponseHeadersField { get; set; } = "headers";
/// <summary>
/// Default name for the response content type field within annotated types.
/// </summary>
public string ResponseContentTypeField { get; set; } = "content_type";
/// <summary>
/// Default name for the response success field within annotated types.
/// </summary>
public string ResponseSuccessField { get; set; } = "success";
/// <summary>
/// Default name for the response error message field within annotated types.
/// </summary>
public string ResponseErrorMessageField { get; set; } = "error_message";
/// <summary>
/// Base URL for resolving relative paths in HTTP type definitions (e.g., "GET /api/test").
/// When set, relative URLs are prefixed with this base URL. When null, the server's
/// own listening address is auto-detected at runtime from the first incoming request.
/// Example: "http://localhost:5000"
/// </summary>
public string? SelfBaseUrl { get; set; }
}