Makes an API request with automatic endpoint fallback.
Tries api.salesforce.com first. For orgs on internal instances only, then tries test., dev., and
stage.api.salesforce.com on 404. A fallback host that can't be reached is skipped, so its connection
error never hides the 404 from api.salesforce.com.
GovCloud orgs, identified by the sfap_rh claim of the connection's JWT, are sent to the GovCloud
hosts of their environment instead, with the x-salesforce-region header SFAP routes them on.
Makes an API request with automatic endpoint fallback. Tries api.salesforce.com first. For orgs on internal instances only, then tries test., dev., and stage.api.salesforce.com on 404. A fallback host that can't be reached is skipped, so its connection error never hides the 404 from api.salesforce.com.
GovCloud orgs, identified by the sfap_rh claim of the connection's JWT, are sent to the GovCloud hosts of their environment instead, with the x-salesforce-region header SFAP routes them on.