예제 #1
0
        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));
        }
예제 #2
0
 public TransactionsGetResponse Get(TransactionsGetRequest request)
 {
     return(GetAsync(request).GetAwaiter().GetResult());
 }