public async Task <InstitutionsGetResponse> GetAsync(InstitutionsGetRequest request) { var data = JsonSerializer.Serialize(request, SerializerOptions); var content = new StringContent(data, Encoding.UTF8, "application/json"); var httpResponse = await HttpClient.PostAsync("/institutions/get", content); httpResponse.EnsureSuccessStatusCode(); var rawResponse = await httpResponse.Content.ReadAsStringAsync(); return(JsonSerializer.Deserialize <InstitutionsGetResponse>(rawResponse, SerializerOptions)); }
public InstitutionsGetResponse Get(InstitutionsGetRequest request) { return(GetAsync(request).GetAwaiter().GetResult()); }