UNPKG

1.1 kBJavaScriptView Raw
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License. See License.txt in the project root for license information.
3import { __extends } from "tslib";
4import { BaseRequestPolicy, } from "./requestPolicy";
5var proxyNotSupportedInBrowser = new Error("ProxyPolicy is not supported in browser environment");
6export function getDefaultProxySettings(_proxyUrl) {
7 return undefined;
8}
9export function proxyPolicy(_proxySettings) {
10 return {
11 create: function (_nextPolicy, _options) {
12 throw proxyNotSupportedInBrowser;
13 },
14 };
15}
16var ProxyPolicy = /** @class */ (function (_super) {
17 __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));
28export { ProxyPolicy };
29//# sourceMappingURL=proxyPolicy.browser.js.map
\No newline at end of file