Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Libraries/Network/XMLHttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
}

set responseType(responseType: ResponseType): void {
if (this._sent) {
throw new Error(
'Failed to set the \'responseType\' property on \'XMLHttpRequest\': The ' +
'response type cannot be set after the request has been sent.'
);
}
if (!SUPPORTED_RESPONSE_TYPES.hasOwnProperty(responseType)) {
warning(
false,
Expand Down
5 changes: 0 additions & 5 deletions Libraries/Network/__tests__/XMLHttpRequest-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ describe('XMLHttpRequest', function() {

xhr.responseType = 'arraybuffer';
expect(xhr.responseType).toBe('arraybuffer');

// Can't change responseType after first data has been received.
xhr.open('GET', 'blabla');
xhr.send();
expect(() => { xhr.responseType = 'text'; }).toThrow();
});

it('should expose responseText correctly', function() {
Expand Down