function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prufrockprufrock 

Callout Request Compression from Apex code

Hello,

We have several webservice callouts from few Apex classes. In one particar instance we have this request that could amount to more than 100k.

 

The question I have : can we use any particular HttpRequest 1.1 header attribute or any other apex attribute (i.e. timeout__x) to compress the content from apex classes?

 

Is there any other options just the way have it in HttpRquest class or that 100k limit is the absolute final?

 

Greatly appreciate your response.

 

Thank you.

--FM

Message Edited by prufrock on 03-19-2009 03:44 PM
Message Edited by prufrock on 03-19-2009 03:51 PM
matt@groupcardmatt@groupcard

Maybe I am missing something, but can't you just add setCompressed to the request

 

HttpRequest req = new HttpRequest();

req.setMethod('POST');

req.setCompressed(true);

 

-Matt