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