Hi, I have camel restlet component which send large data of around 500K records in json. if i send without zip it take around 20 min. I though to zip my response so i have include content encoding header like this but in this case request is getting failed
<get uri="/getAnalyticsReport?synchronous=true&streamRepresentation=true" bindingMode="off"> <to uri="direct:analyticsReport" /> </get> <route id="analyticsReport"> <from uri="direct:analyticsReport" /> <bean ref="algo" method="fetchInstrumentValues" /> <setHeader headerName="Exchange.CONTENT_ENCODING"> <constant>gzip</constant> </setHeader> </route> I tried with other way but still no success <route id="analyticsReport"> <from uri="direct:analyticsReport" /> <bean ref="algo" method="fetchInstrumentValues" /> <setHeader headerName="Exchange.SKIP_GZIP_ENCODING"> <constant>false</constant> </setHeader> <setHeader headerName="Exchange.HTTP_CHARACTER_ENCODING"> <constant>UTF-8</constant> </setHeader> </route> my function returns string of json data. these are response header HTTP/1.1 200 OK Content-encoding: gzip Server: Restlet-Framework/2.2.1 Access-control-allow-headers: access-control-allow-methods,access-control-allow-origin,authorization,content-type Breadcrumbid: ID-DESKTOP-CMAL9V7-58651-1570034356268-0-15 Access-control-max-age: 3600 Date: Wed, 02 Oct 2019 16:40:19 GMT Access-control-allow-methods: GET,PUT,POST,HEAD,OPTIONS Transfer-encoding: chunked Content-type: text/plain Access-control-allow-origin: * -- Regards Bhavishya Goyal