angular/packages/platform-server/src/http.ts
Alan Agius e99460865e refactor(platform-server): deprecate useAbsoluteUrl and baseUrl (#49546)
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
2023-03-29 09:13:41 -07:00

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},
];