protected async Task <TResponse> PostAsync <TResponse, TResult>(IRippledRequest request) where TResponse : IRpcJsonResponse <TResult> { RawResponse = await _client.PostAsync(request); var formattedResponse = FormatPropertyNames(RawResponse); return(JsonConvert.DeserializeObject <TResponse>(formattedResponse, _serializerSettings)); }
public async Task <string> PostAsync(IRippledRequest request) { var json = request.ToJson(); var queryString = new StringContent(json); var message = await _client.PostAsync("", queryString); message.EnsureSuccessStatusCode(); return(await message.Content.ReadAsStringAsync()); }