Interface IManagementConnection
- Namespace
 - Auth0.ManagementApi
 
- Assembly
 - Auth0.ManagementApi.dll
 
Interface for connectivity between ManagementApiClient and the remote server.
public interface IManagementConnection
  Remarks
A default implementation of this using HttpClient is included as HttpClientManagementConnection. You should mock this interface to perform unit testing of code that uses ManagementApiClient.
Methods
GetAsync<T>(Uri, IDictionary<string, string>, JsonConverter[], CancellationToken)
Perform a HTTP GET operation against a given Uri and return the materialized response body as T.
Task<T> GetAsync<T>(Uri uri, IDictionary<string, string> headers, JsonConverter[] converters = null, CancellationToken cancellationToken = default)
  Parameters
uriUriUri to perform the GET request against.
headersIDictionary<string, string>Dictionary containing additional headers that may override the defaults.
convertersJsonConverter[]Optional array of Newtonsoft.Json.JsonConverters used to deserialize the resulting
T.cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
Type Parameters
TType of object to deserialize the result content as.
SendAsync<T>(HttpMethod, Uri, object, IDictionary<string, string>, IList<FileUploadParameter>, JsonConverter[], CancellationToken)
Perform a HTTP operation against a given Uri and return any materialized response body as T.
Task<T> SendAsync<T>(HttpMethod method, Uri uri, object body, IDictionary<string, string> headers, IList<FileUploadParameter> files = null, JsonConverter[] converters = null, CancellationToken cancellationToken = default)
  Parameters
methodHttpMethodHttpMethod to use in performing the request.
uriUriUri to perform the request against.
bodyobjectPayload to send to the server. If specified as a Dictionary<string, string> then FormUrlEncodedContent is expected, otherwise StringContent containing the JSON representation of the object is expected.
headersIDictionary<string, string>Dictionary containing additional headers that may override the defaults.
filesIList<FileUploadParameter>Optional IList<T> containing file contents to upload as a MultipartFormDataContent post.
convertersJsonConverter[]Optional array of Newtonsoft.Json.JsonConverters used to deserialize the resulting
T.cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
Type Parameters
TType of object to deserialize the result content as.
Remarks
files can only be specified if body is a Dictionary%lt;string, object%gt;"/>.