mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
These two options where created for a feature which was never completed. https://github.com/angular/universal/pull/1860 Eventually these options should be added to `withTransferCache` HTTP logic. DEPRECATED: `PlatformConfig.baseUrl` and `PlatformConfig.useAbsoluteUrl` platform-server config options are deprecated as these were not used. PR Close #49546
23 lines
565 B
TypeScript
23 lines
565 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
import {XhrFactory} from '@angular/common';
|
|
import {Injectable, Provider} from '@angular/core';
|
|
import * as xhr2 from 'xhr2';
|
|
|
|
@Injectable()
|
|
export class ServerXhr implements XhrFactory {
|
|
build(): XMLHttpRequest {
|
|
return new xhr2.XMLHttpRequest();
|
|
}
|
|
}
|
|
|
|
|
|
export const SERVER_HTTP_PROVIDERS: Provider[] = [
|
|
{provide: XhrFactory, useClass: ServerXhr},
|
|
];
|