microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
core/src/Microsoft.Teams.Bot.Core/Http/BotRequestOptions.cs
40lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using Microsoft.Teams.Bot.Core.Schema; |
| 5 | |
| 6 | namespace Microsoft.Teams.Bot.Core.Http; |
| 7 | |
| 8 | using CustomHeaders = Dictionary<string, string>; |
| 9 | |
| 10 | /// <summary> |
| 11 | /// Options for configuring a bot HTTP request. |
| 12 | /// </summary> |
| 13 | public record BotRequestOptions |
| 14 | { |
| 15 | /// <summary> |
| 16 | /// Gets the agentic identity for authentication. |
| 17 | /// </summary> |
| 18 | public AgenticIdentity? AgenticIdentity { get; init; } |
| 19 | |
| 20 | /// <summary> |
| 21 | /// Gets the custom headers to include in the request. |
| 22 | /// These headers override default headers if the same key exists. |
| 23 | /// </summary> |
| 24 | public CustomHeaders? CustomHeaders { get; init; } |
| 25 | |
| 26 | /// <summary> |
| 27 | /// Gets the default custom headers that will be included in all requests. |
| 28 | /// </summary> |
| 29 | public CustomHeaders? DefaultHeaders { get; init; } |
| 30 | |
| 31 | /// <summary> |
| 32 | /// Gets a value indicating whether to return null instead of throwing on 404 responses. |
| 33 | /// </summary> |
| 34 | public bool ReturnNullOnNotFound { get; init; } |
| 35 | |
| 36 | /// <summary> |
| 37 | /// Gets a description of the operation for logging and error messages. |
| 38 | /// </summary> |
| 39 | public string? OperationDescription { get; init; } |
| 40 | } |
| 41 | |