public async Task <SteamHttpResponse> SendRequestAsync(SteamRequestBase request) { Debug.WriteLine("Requesting: " + request.Request); HttpResponseMessage response = await HttpClient.GetAsync(request.Request); return(new SteamHttpResponse(response.IsSuccessStatusCode, await response.Content.ReadAsStringAsync())); }
private async Task <Result <string> > SendRequestAsync(SteamRequestBase request) { Debug.WriteLine("Requesting: " + request.Request); HttpResponseMessage response = await HttpClient.GetAsync(request.Request); if (response.IsSuccessStatusCode) { return(Result <string> .Ok(await response.Content.ReadAsStringAsync())); } else { return(Result <string> .Err(response.ReasonPhrase)); } }