proxyPolicy.browser.js 1.1 KB

1234567891011121314151617181920212223242526272829
  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License. See License.txt in the project root for license information.
  3. import * as tslib_1 from "tslib";
  4. import { BaseRequestPolicy } from "./requestPolicy";
  5. var proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment");
  6. export function getDefaultProxySettings(_proxyUrl) {
  7. return undefined;
  8. }
  9. export function proxyPolicy(_proxySettings) {
  10. return {
  11. create: function (_nextPolicy, _options) {
  12. throw proxyNotSupportedInBrowser;
  13. }
  14. };
  15. }
  16. var ProxyPolicy = /** @class */ (function (_super) {
  17. tslib_1.__extends(ProxyPolicy, _super);
  18. function ProxyPolicy(nextPolicy, options) {
  19. var _this = _super.call(this, nextPolicy, options) || this;
  20. throw proxyNotSupportedInBrowser;
  21. return _this;
  22. }
  23. ProxyPolicy.prototype.sendRequest = function (_request) {
  24. throw proxyNotSupportedInBrowser;
  25. };
  26. return ProxyPolicy;
  27. }(BaseRequestPolicy));
  28. export { ProxyPolicy };
  29. //# sourceMappingURL=proxyPolicy.browser.js.map