main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard").default;
|
---|
4 | var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault").default;
|
---|
5 | exports.__esModule = true;
|
---|
6 | exports.default = void 0;
|
---|
7 | var _stampit = _interopRequireDefault(require("stampit"));
|
---|
8 | var _apidomError = require("@swagger-api/apidom-error");
|
---|
9 | var _Resolver = _interopRequireDefault(require("./Resolver.cjs"));
|
---|
10 | var url = _interopRequireWildcard(require("../../util/url.cjs"));
|
---|
11 | const HttpResolver = (0, _stampit.default)(_Resolver.default, {
|
---|
12 | props: {
|
---|
13 | timeout: 5000,
|
---|
14 | redirects: 5,
|
---|
15 | withCredentials: false
|
---|
16 | },
|
---|
17 | init({
|
---|
18 | timeout = this.timeout,
|
---|
19 | redirects = this.redirects,
|
---|
20 | withCredentials = this.withCredentials
|
---|
21 | } = {}) {
|
---|
22 | this.timeout = timeout;
|
---|
23 | this.redirects = redirects;
|
---|
24 | this.withCredentials = withCredentials;
|
---|
25 | },
|
---|
26 | methods: {
|
---|
27 | canRead(file) {
|
---|
28 | return url.isHttpUrl(file.uri);
|
---|
29 | },
|
---|
30 | async read() {
|
---|
31 | throw new _apidomError.NotImplementedError('read method in HttpResolver stamp is not yet implemented.');
|
---|
32 | },
|
---|
33 | getHttpClient() {
|
---|
34 | throw new _apidomError.NotImplementedError('getHttpClient method in HttpResolver stamp is not yet implemented.');
|
---|
35 | }
|
---|
36 | }
|
---|
37 | });
|
---|
38 | var _default = exports.default = HttpResolver; |
---|
Note:
See
TracBrowser
for help on using the repository browser.