Esempio n. 1
0
        private async static Task <AuthResponse> GetAuthResponse(string username, string password)
        {
            var requestModel = new AuthRequest
            {
                ApplicationId = Constants.BrightApplicationIdString,
                Username      = username,
                Password      = password
            };

            var response = await _httpClient.PostAsJsonAsync($"https://api.glowmarkt.com/api/v0-1/auth", requestModel);

            response.EnsureSuccessStatusCode();
            return(AuthResponse.FromJson(await response.Content.ReadAsStringAsync()));
        }