Exemplo n.º 1
0
        private async Task <string> SendAsync(IEc2Request request)
        {
            var httpRequest = new HttpRequestMessage(HttpMethod.Post, Endpoint)
            {
                Content = GetPostContent(request.ToParams())
            };

            return(await SendAsync(httpRequest).ConfigureAwait(false));
        }
Exemplo n.º 2
0
        private async Task <TResponse> SendAsync <TResponse>(IEc2Request request)
            where TResponse : IEc2Response
        {
            var httpRequest = new HttpRequestMessage(HttpMethod.Post, Endpoint)
            {
                Content = GetPostContent(request.ToParams())
            };

            string responseXml = await SendAsync(httpRequest).ConfigureAwait(false);

            return(Ec2Serializer <TResponse> .Deserialize(responseXml));
        }