File tree Expand file tree Collapse file tree 5 files changed +5
-8
lines changed Expand file tree Collapse file tree 5 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
1
{{> header }}
2
2
3
3
import type { ApiRequestOptions } from './ApiRequestOptions';
4
- import type { OpenAPIConfig } from './OpenAPI';
4
+ import type { OpenAPIConfig2 } from './OpenAPI';
5
5
import type { CancelablePromise } from './CancelablePromise';
6
6
7
7
export class BaseHttpRequest {
Original file line number Diff line number Diff line change 1
- {{ ~#equals @root.httpClient ' fetch' }} {{> fetch/request }} {{ /equals ~}}
2
- {{ ~#equals @root.httpClient ' xhr' }} {{> xhr/request }} {{ /equals ~}}
3
1
{{ ~#equals @root.httpClient ' axios' }} {{> axios/request }} {{ /equals ~}}
4
- {{ ~#equals @root.httpClient ' node' }} {{> node/request }} {{ /equals ~}}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import type { ApiRequestOptions } from './ApiRequestOptions';
8
8
import type { ApiResult } from './ApiResult';
9
9
import { CancelablePromise } from './CancelablePromise';
10
10
import type { OnCancel } from './CancelablePromise';
11
- import type { OpenAPIConfig } from './OpenAPI';
11
+ import type { OpenAPIConfig2 } from './OpenAPI';
12
12
{{ #if @root.exportClient }}
13
13
import { BaseHttpRequest } from './BaseHttpRequest';
14
14
{{ else }}
@@ -64,7 +64,7 @@ import { OpenAPI } from './OpenAPI';
64
64
65
65
{{ #if @root.exportClient }}
66
66
export class AxiosHttpRequest extends BaseHttpRequest {
67
- constructor(openApiConfig: OpenAPIConfig ) {
67
+ constructor(openApiConfig: 2 ) {
68
68
super(openApiConfig);
69
69
}
70
70
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ async function sendRequest(
5
5
body: any,
6
6
headers: Record<string , string>,
7
7
onCancel: OnCancel,
8
- openApiConfig: OpenAPIConfig
8
+ openApiConfig: OpenAPIConfig2
9
9
): Promise<AxiosResponse <any>> {
10
10
const source = axios.CancelToken.source();
11
11
const newUrl = openApiConfig.edge ? url.replace("{edge}", openApiConfig.edge) : url;
Original file line number Diff line number Diff line change 1
- function getUrl(options: ApiRequestOptions, config: OpenAPIConfig ): string {
1
+ function getUrl(options: ApiRequestOptions, config: OpenAPIConfig2 ): string {
2
2
const url = `${config.base}${options.path}`;
3
3
if (options.query) {
4
4
return `${url}${getQueryString(options.query)}`;
You can’t perform that action at this time.
0 commit comments