Domanda

I am using restlet and returning xml response as StringRepresentation. One of my service need to return a large amount of data that makes the response size close to 5 MB.

Is there any way to zip this response?

È stato utile?

Soluzione

Wrapping it in an EncodeRepresentationshould work psudocode:

return new EncodeRepresentation(Encoding.ZIP, StringRepresentation);

Do double check that I have selected the correct encoding for you there are a few options.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top