}
@Override
public void upsertSObject(String sObjectName, String fieldName, String fieldValue, InputStream sObject,
ResponseCallback callback) {
final ContentExchange patch = getContentExchange("PATCH",
sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue));
// requires authorization token
setAccessToken(patch);
// input stream as entity content
patch.setRequestContentSource(sObject);
// TODO will the encoding always be UTF-8??
patch.setRequestContentType(PayloadFormat.JSON.equals(format) ? APPLICATION_JSON_UTF8 : APPLICATION_XML_UTF8);
doHttpRequest(patch, new DelegatingClientCallback(callback));
}