public void putObject(final String relativePath, String object, boolean sync,
boolean isEventually, Map<String, String> header, GenericObjectCallback callback,
String objectId, String _internalId) {
try {
if (isEventually) {
File archivedFile = archiveRequest("put", relativePath, object, objectId, _internalId);
handleArchivedRequest(archivedFile, sync, callback);
} else {
String url = buildUrl(relativePath);
AsyncHttpResponseHandler handler = createPostHandler(callback);
if (InternalConfigurationController.globalInstance().getInternalLogger().isDebugEnabled()) {
dumpHttpPutRequest(header, url, object);
}
AVHttpClient client = clientInstance();
Request.Builder builder = new Request.Builder();
builder.url(url).put(RequestBody.create(AVHttpClient.JSON, object));
updateHeaders(builder, header, callback != null && callback.isRequestStatisticNeed());
client.execute(builder.build(), sync, handler);
}
} catch (Exception exception) {
processException(exception, callback);
}
}