MakeDeleteRequestWithAuthTestAsync() 공개 메소드

Calls MakeDeleteRequestAsync(string) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again
public MakeDeleteRequestWithAuthTestAsync ( String method ) : Task
method String The method to call
리턴 Task
예제 #1
0
        /// <summary>
        /// Unclaims the Device asynchronous.
        /// </summary>
        /// <returns></returns>
        public async Task <Result> UnclaimAsync()
        {
            try
            {
                var result = await cloud.MakeDeleteRequestWithAuthTestAsync($"devices/{Id}");

                return(result.AsResult());
            }
            catch (HttpRequestException re)
            {
                return(new Result
                {
                    Success = false,
                    Error = re.Message,
                    Exception = re
                });
            }
        }