// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.Graph
{
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
///
/// Interface for an HTTP provider to send requests.
///
public interface IHttpProvider : IDisposable
{
///
/// Gets a serializer for serializing and deserializing JSON objects.
///
ISerializer Serializer { get; }
///
/// Gets or sets the timeout interval. The default value is 100 seconds.
///
TimeSpan OverallTimeout { get; set; }
///
/// Sends the request.
///
/// The to send.
/// The .
Task SendAsync(HttpRequestMessage request);
///
/// Sends the request.
///
/// The to send.
/// The to pass to the on send.
/// The for the request.
/// The .
Task SendAsync(
HttpRequestMessage request,
HttpCompletionOption completionOption,
CancellationToken cancellationToken);
}
}