mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
More changes
This commit is contained in:
parent
8b64c18ace
commit
f706b36ae5
22 changed files with 646 additions and 18 deletions
|
@ -13,20 +13,7 @@ namespace Ombi.Api
|
|||
{
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
};
|
||||
public async Task<T> Get<T>(Uri uri)
|
||||
{
|
||||
var h = new HttpClient();
|
||||
//h.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
|
||||
var response = await h.GetAsync(uri);
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
// Logging
|
||||
}
|
||||
var receiveString = await response.Content.ReadAsStringAsync();
|
||||
return JsonConvert.DeserializeObject<T>(receiveString, Settings);
|
||||
}
|
||||
|
||||
|
||||
public async Task<T> Request<T>(Request request)
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue