[tb] Switch to POST for partitions API call
@@ -1461,13 +1461,10 @@ var ApiHelper = (function () {
var deferred = $.Deferred();
// TODO: No sourceType needed?
- var request = $.ajax({
- url: '/metastore/table/' + options.path.join('/') + '/partitions',
- data: {
+ var request = $.post('/metastore/table/' + options.path.join('/') + '/partitions', {
format: 'json',
cluster: JSON.stringify(options.compute)
- },
- success: function (response) {
+ }).done(function (response) {
if (!self.successResponseIsError(response)) {
if (!response) {
response = {};
@@ -1480,8 +1477,7 @@ var ApiHelper = (function () {
errorCallback: deferred.reject
})(response);
}
- },
- error: function (response) {
+ }).fail(function (response) {
// Don't report any partitions if it's not partitioned instead of error to prevent unnecessary calls
if (response && response.responseText && response.responseText.indexOf('is not partitioned') !== -1) {
deferred.resolve({
@@ -1495,7 +1491,6 @@ var ApiHelper = (function () {
errorCallback: deferred.reject
})(response);
}
- }
});
return new CancellablePromise(deferred, request);
