fix($http): allow sending Blob data using $http

Closes #5012
This commit is contained in:
Bruno Baia
2013-11-19 00:30:36 +01:00
committed by Pawel Kozlowski
parent 511422adb0
commit b8cc71d476
4 changed files with 18 additions and 1 deletions

View File

@@ -989,6 +989,16 @@ describe('$http', function() {
});
it('should ignore Blob objects', function () {
if (!window.Blob) return;
var blob = new Blob(['blob!'], { type: 'text/plain' });
$httpBackend.expect('POST', '/url', '[object Blob]').respond('');
$http({ method: 'POST', url: '/url', data: blob });
});
it('should have access to request headers', function() {
$httpBackend.expect('POST', '/url', 'header1').respond(200);
$http.post('/url', 'req', {