Ejemplo n.º 1
0
        protected TResponse Get <TRequest, TResponse>(TRequest request)
            where TRequest : APIRequestBodyBase <TRequest>
            where TResponse : APIResponseBodyBase <TResponse>
        {
            var result = _handler.Handle(() =>
            {
                _restfulClient = _restfulClient ?? new RestfulClient();
                return(_restfulClient.DoGet(request.Url,
                                            request.ToString(),
                                            request.Headers));
            });
            var response = APIResponseBodyBase <TResponse> .Deserialize(result);

            return(response);
        }