Debian Codegraph @

node/rxjs/dist/esm/internal/ajax/getXHRResponse.js

raw
1 export function getXHRResponse(xhr) {
2 switch (xhr.responseType) {
3 case 'json': {
4 if ('response' in xhr) {
5 return xhr.response;
6 }
7 else {
8 const ieXHR = xhr;
9 return JSON.parse(ieXHR.responseText);
10 }
11 }
12 case 'document':
13 return xhr.responseXML;
14 case 'text':
15 default: {
16 if ('response' in xhr) {
17 return xhr.response;
18 }
19 else {
20 const ieXHR = xhr;
21 return ieXHR.responseText;
22 }
23 }
24 }
25 }
26 //# sourceMappingURL=getXHRResponse.js.map