public async Task<Result> SignupWithUserAsync(String username, String password)
{
if (String.IsNullOrWhiteSpace(username))
{
throw new ArgumentNullException(nameof(username));
}
if (String.IsNullOrWhiteSpace(password))
{
throw new ArgumentNullException(nameof(password));
}
try
{
var result = await MakePostRequestWithoutAuthAsync("users", new KeyValuePair<string, string>("username", username), new KeyValuePair<string, string>("password", password));
return result.AsResult();
}
catch (HttpRequestException re)
{
return new Result
{
Success = false,
Error = re.Message,
Exception = re
};
}
}