refactor: remove some facades (#12335)

This commit is contained in:
Victor Berchet
2016-10-19 13:42:39 -07:00
committed by Alex Rickabaugh
parent 0ecd9b2df0
commit 76dd026447
58 changed files with 281 additions and 429 deletions

View File

@ -13,7 +13,7 @@ import {Observer} from 'rxjs/Observer';
import {ResponseOptions} from '../base_response_options';
import {ContentType, ReadyState, RequestMethod, ResponseContentType, ResponseType} from '../enums';
import {isPresent, isString} from '../facade/lang';
import {isPresent} from '../facade/lang';
import {Headers} from '../headers';
import {getResponseURL, isSuccess} from '../http_utils';
import {Connection, ConnectionBackend, XSRFStrategy} from '../interfaces';
@ -57,7 +57,7 @@ export class XHRConnection implements Connection {
// by IE10)
let body = _xhr.response === undefined ? _xhr.responseText : _xhr.response;
// Implicitly strip a potential XSSI prefix.
if (isString(body)) body = body.replace(XSSI_PREFIX, '');
if (typeof body === 'string') body = body.replace(XSSI_PREFIX, '');
let headers = Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders());
let url = getResponseURL(_xhr);