feat(esppApi): Заготовка для api
This commit is contained in:
27
PARR.EsppApi/Services/Espp.cs
Normal file
27
PARR.EsppApi/Services/Espp.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user