From b8cc71d476f76ff51e719fb76fb2348027c858ce Mon Sep 17 00:00:00 2001 From: Bruno Baia Date: Tue, 19 Nov 2013 00:30:36 +0100 Subject: fix($http): allow sending Blob data using $http Closes #5012 --- test/ng/httpSpec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js index a7b24483..86ab72ea 100644 --- a/test/ng/httpSpec.js +++ b/test/ng/httpSpec.js @@ -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', { -- cgit v1.2.3