public RestBucksClient()
 {
     // Create and configure RestTemplate
     restTemplate = new RestTemplate(BaseUrl);
     DataContractHttpMessageConverter xmlConverter = new DataContractHttpMessageConverter();
     xmlConverter.SupportedMediaTypes = new MediaType[]{ new MediaType("application", "vnd.restbucks+xml") };
     restTemplate.MessageConverters.Add(xmlConverter);
 }
Пример #2
0
        public RestBucksClient()
        {
            // Create and configure RestTemplate
            restTemplate = new RestTemplate(BaseUrl);
            DataContractHttpMessageConverter xmlConverter = new DataContractHttpMessageConverter();

            xmlConverter.SupportedMediaTypes = new MediaType[] { new MediaType("application", "vnd.restbucks+xml") };
            restTemplate.MessageConverters.Add(xmlConverter);
        }