Salesforce Exception External server did not return any content

Salesforce Exception External server did not return any content

Exception:

System.CalloutException: IO Exception: External server did not return any content

Resolution:

1. If you are using SOAP API, make sure the env:Header is not blank. It should contain the Header content as expected from the APIs.

2. If you are using WSDL Apex Class to make the Callouts, make sure to use inputHttpHeaders_x to pass the header value to the API endpoint URL.

3. Check the protocol of the API endpoint URL. Check whether it is HTTP or HTTPS. For HTTPS API endpoint, if we use HTTP, then it will throw the exception.

Leave a Reply