Improved ajax post
This commit is contained in:
parent
3a12336eb7
commit
27d33a3027
@ -1071,7 +1071,7 @@ factory('MtpAuthorizer', function (MtpDcConfigurator, MtpRsaKeysManager, MtpSecu
|
|||||||
delete $http.defaults.headers.post['Content-Type'];
|
delete $http.defaults.headers.post['Content-Type'];
|
||||||
delete $http.defaults.headers.common['Accept'];
|
delete $http.defaults.headers.common['Accept'];
|
||||||
|
|
||||||
return $http.post('http://' + MtpDcConfigurator.chooseServer(dcID) + '/apiw1', resultArray, {
|
return $http.post('http://' + MtpDcConfigurator.chooseServer(dcID) + '/apiw1', resultArray.buffer, {
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
transformRequest: null,
|
transformRequest: null,
|
||||||
transformResponse: function (responseBuffer) {
|
transformResponse: function (responseBuffer) {
|
||||||
@ -2028,7 +2028,7 @@ factory('MtpNetworkerFactory', function (MtpDcConfigurator, MtpMessageIdGenerato
|
|||||||
delete $http.defaults.headers.post['Content-Type'];
|
delete $http.defaults.headers.post['Content-Type'];
|
||||||
delete $http.defaults.headers.common['Accept'];
|
delete $http.defaults.headers.common['Accept'];
|
||||||
|
|
||||||
return $http.post('http://' + MtpDcConfigurator.chooseServer(self.dcID) + '/apiw1', request.getArray(), {
|
return $http.post('http://' + MtpDcConfigurator.chooseServer(self.dcID) + '/apiw1', request.getBuffer(), {
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
transformRequest: null
|
transformRequest: null
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user