Hello!
I just started my journey with the Spring for Android and I've encountered a problem with the usage of the GZIP i have the following code in my app:
and i receive the following error:Code:HttpHeaders requestHeaders = new HttpHeaders(); requestHeaders.setAcceptEncoding(ContentCodingType.ALL); HttpEntity<?> requestEntity = new HttpEntity<Object>(requestHeaders); RestTemplate restTemplate = new RestTemplate(); restTemplate.getMessageConverters().add(new SimpleXmlHttpMessageConverter()); ResponseEntity<OfertaList> response = restTemplate.exchange(url, HttpMethod.GET, requestEntity, OfertaList.class);
when I use just:Code:java.lang.RuntimeException: Unable to start activity ComponentInfo{...Activity}: org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [pl.magres.mobile.classes.OfertaList] and content type [application/x-gzip]
OfertaList result = restTemplate.getForObject(url, OfertaList.class, "");
and the webservice without GZIP compression everything works
what am i doing wrong?


Reply With Quote
