EmptyNodeHttpClient.js 1.5 KB

1234567891011121314151617181920212223242526272829
  1. "use strict";
  2. // Copyright (c) .NET Foundation. All rights reserved.
  3. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
  4. var __extends = (this && this.__extends) || (function () {
  5. var extendStatics = Object.setPrototypeOf ||
  6. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  7. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  8. return function (d, b) {
  9. extendStatics(d, b);
  10. function __() { this.constructor = d; }
  11. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  12. };
  13. })();
  14. Object.defineProperty(exports, "__esModule", { value: true });
  15. // This is an empty implementation of the NodeHttpClient that will be included in browser builds so the output file will be smaller
  16. var HttpClient_1 = require("./HttpClient");
  17. var NodeHttpClient = /** @class */ (function (_super) {
  18. __extends(NodeHttpClient, _super);
  19. // @ts-ignore: Need ILogger to compile, but unused variables generate errors
  20. function NodeHttpClient(logger) {
  21. return _super.call(this) || this;
  22. }
  23. NodeHttpClient.prototype.send = function () {
  24. 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."));
  25. };
  26. return NodeHttpClient;
  27. }(HttpClient_1.HttpClient));
  28. exports.NodeHttpClient = NodeHttpClient;
  29. //# sourceMappingURL=EmptyNodeHttpClient.js.map