| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. See License.txt in the project root for license information. |
| | | 3 | | |
| | | 4 | | using System.Threading; |
| | | 5 | | using System.Threading.Tasks; |
| | | 6 | | using System.Net.Http; |
| | | 7 | | |
| | | 8 | | namespace Microsoft.Azure.Attestation |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// The Attestation credential class that implements <see cref="CustomDelegatingHandler"/> |
| | | 12 | | /// </summary> |
| | | 13 | | public class CustomDelegatingHandler : DelegatingHandler |
| | | 14 | | { |
| | 0 | 15 | | internal AttestationClient Client { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// SendAsync. |
| | | 19 | | /// </summary> |
| | | 20 | | /// <param name="request"> request. </param> |
| | | 21 | | /// <param name="cancellationToken"> cancellationToken. </param> |
| | | 22 | | protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cance |
| | | 23 | | { |
| | | 24 | | // Call the inner handler. |
| | 0 | 25 | | var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); |
| | | 26 | | |
| | 0 | 27 | | return response; |
| | 0 | 28 | | } |
| | | 29 | | } |
| | | 30 | | } |