• Cory Gross
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 3
    Replies
I am using the REST query service, and I am having trouble getting Salesforce to compress the response.  Specifically, Salesforce refuses to compress the response when I request XML vs. JSON.

Here is the URL I am using:
/services/data/v36.0/query.xml?q=Select+Id%2CName+From+Account

I am sending the HTTP header "Accept-Encoding: gzip".  If I remove the ".xml" from the URL or change it to ".json", I get GZIP compressed JSON.  However, I have been unable to get a GZIP compressed XML response from the API.

For the record, I have also tried specifying the header "Accept: application/xml" instead of appending ".xml" to the URL.  The result is the same.

Any ideas?  Any assistance is much appreciated.  I am going to be moving quite a bit of data around, and GZIP compression will save me 80-90%.
I am using the REST query service, and I am having trouble getting Salesforce to compress the response.  Specifically, Salesforce refuses to compress the response when I request XML vs. JSON.

Here is the URL I am using:
/services/data/v36.0/query.xml?q=Select+Id%2CName+From+Account

I am sending the HTTP header "Accept-Encoding: gzip".  If I remove the ".xml" from the URL or change it to ".json", I get GZIP compressed JSON.  However, I have been unable to get a GZIP compressed XML response from the API.

For the record, I have also tried specifying the header "Accept: application/xml" instead of appending ".xml" to the URL.  The result is the same.

Any ideas?  Any assistance is much appreciated.  I am going to be moving quite a bit of data around, and GZIP compression will save me 80-90%.
I am using the REST API PATCH call to update a Contact like so:

URL: salesforce/data/<version>/sobjects/Contact/<externalidentifier>/<value>
JSON: map of fields to values

In addition to settings some values, I'd like to set others to null. I tried to pass fieldsToNull = [string, string, string] in the JSON.

However this results in a response saying:
"No such column 'fieldsToNull' on sobject of type Contact."

I also tried appending ?fieldsToNull=<field> to the request URL, which than returned successfully, but had no affect in respect to settings the field to null.

All documentation I can find providing examples with fieldsToNull are for soap/wsdl and not rest.
I am using the REST API PATCH call to update a Contact like so:

URL: salesforce/data/<version>/sobjects/Contact/<externalidentifier>/<value>
JSON: map of fields to values

In addition to settings some values, I'd like to set others to null. I tried to pass fieldsToNull = [string, string, string] in the JSON.

However this results in a response saying:
"No such column 'fieldsToNull' on sobject of type Contact."

I also tried appending ?fieldsToNull=<field> to the request URL, which than returned successfully, but had no affect in respect to settings the field to null.

All documentation I can find providing examples with fieldsToNull are for soap/wsdl and not rest.