add Identity based Http Provider ...
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using RestSharp;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xHttpService.Constants;
|
||||
using xIdentityService.Models;
|
||||
using xHttpService.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xIdentityService.Interfaces
|
||||
{
|
||||
public partial interface IXIdentityHttpProvider : IXHttpProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Get an Instance of RestRequest ...
|
||||
/// </summary>
|
||||
/// <param name="endpoint"></param>
|
||||
/// <param name="addXPoweredValue"></param>
|
||||
/// <param name="params"></param>
|
||||
/// <param name="headers"></param>
|
||||
/// <param name="queryStrings"></param>
|
||||
/// <returns></returns>
|
||||
RestRequest GetRestRequest(
|
||||
string endpoint,
|
||||
bool addXPoweredValue = true,
|
||||
IDictionary<string, string> @params = null,
|
||||
IDictionary<string, string> headers = null,
|
||||
IDictionary<string, string> queryStrings = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Handle Call Specific Request and retrieve Response
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="method"></param>
|
||||
/// <param name="supportRefreshingTokens"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns></returns>
|
||||
Task<T> RunRestRequest<T>(
|
||||
RestClient client,
|
||||
RestRequest request,
|
||||
XHttpMethod method,
|
||||
bool supportRefreshingTokens = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
Task<XBaseRestResponse<T>> RunRestRequestByResponse<T>(
|
||||
RestClient client,
|
||||
RestRequest request,
|
||||
XHttpMethod method,
|
||||
bool supportRefreshingTokens = true,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user