Particle.ParticleCloud.MakeGetRequestWithAuthTestAsync C# (CSharp) Méthode

MakeGetRequestWithAuthTestAsync() public méthode

Calls MakeGetRequestAsync(string) and if it returns a status code of Unauthorized try s to refresh the token and makes the request again
public MakeGetRequestWithAuthTestAsync ( String method ) : Task
method String The method to call
Résultat Task
		public async Task<RequestResponse> MakeGetRequestWithAuthTestAsync(String method)
		{
			var result = await MakeGetRequestAsync(method);
			if (result.StatusCode == System.Net.HttpStatusCode.Unauthorized)
			{
				await RefreshTokenAsync();
				result = await MakeGetRequestAsync(method);
			}

			return result;
		}