UNPKG

851 BPlain TextView Raw
1// Copyright (c) .NET Foundation. All rights reserved.
2// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
4// This is an empty implementation of the NodeHttpClient that will be included in browser builds so the output file will be smaller
5
6import { HttpClient, HttpResponse } from "./HttpClient";
7import { ILogger } from "./ILogger";
8
9/** @private */
10export class NodeHttpClient extends HttpClient {
11 // @ts-ignore: Need ILogger to compile, but unused variables generate errors
12 public constructor(logger: ILogger) {
13 super();
14 }
15
16 public send(): Promise<HttpResponse> {
17 return Promise.reject(new Error("If using Node either provide an XmlHttpRequest polyfill or consume the cjs or esm script instead of the browser/signalr.js one."));
18 }
19}