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
Kumud DixitKumud Dixit 

How to disable Http 100 Continue status code from webservice response?

Dear Friends,

We are integrating an external webservice with the Salesforce App  we are developing .

The external service sends order placed on external online ordering platform (like zomato, swiggy) to Salesforce app we are developing.

The external service is sending an Http header Expect: 100-continue to Salesforce instance. Because of which Salesforce is sending back 100 Continue response.

However the external service not expects the 100 Continue response and re-sends the message as external service was expecting Http 200 response.

We tried sending 200 status code for RestResponse exlicitly, but the webservice is first sending 100 continue response and then only it sends 200 response.

Our query: Can we disable 100 continue response from Salesforce webservice.

Thanks in advance for your help!

Regards

Anup
 
VinayVinay (Salesforce Developers) 
Hi Kumud,

100 Continue means,  The initial part of a request has been received and has not yet been rejected by the server. The server intends to send a final response after the request has been fully received and acted upon.

When the request contains an Expect header field that includes a 100-continue expectation, the 100 response indicates that the server wishes to receive the request payload body1. The client ought to continue sending the request and discard the 100 response.

If the request did not contain an Expect header field containing the 100-continue expectation, the client can simply discard this interim response.

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
Kumud DixitKumud Dixit
Dear Vinay,

Thanks a lot for this explanation. If possible then can we suppress 100 Continue status code from Salesforce and instead send only 200 status code.

Regards

Anup