feat(esppApi): Заготовка для api

This commit is contained in:
Mikhail Trubnikov
2023-10-19 16:55:42 +10:00
parent 526140eea4
commit f45fca9122
14 changed files with 102 additions and 33 deletions

View File

@@ -0,0 +1,27 @@
namespace PARR.EsppApi.Services
{
internal class Espp
{
private readonly HttpClient httpClient;
public Espp(HttpClient httpClient)
{
this.httpClient = httpClient;
}
public async Task<string> Get()
{
//var req = new HttpRequestMessage(HttpMethod.Get, "https://www.google.com");
//if (req == null)
// return;
var response = await httpClient.GetAsync("http://dvocor.dvgd.rzd");
var content = await response.Content.ReadAsStringAsync();
return content;
}
}
}