api-def 0.9.4-alpha.1 → 0.9.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/ApiTypes.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface RetryOptions {
|
|
|
31
31
|
export interface BaseRequestConfig {
|
|
32
32
|
cache?: number | boolean;
|
|
33
33
|
lock?: RequestLock;
|
|
34
|
+
includeCredentials?: boolean;
|
|
34
35
|
retry?: number | false | RetryOptions;
|
|
35
36
|
headers?: Readonly<Headers>;
|
|
36
37
|
acceptableStatus?: AcceptableStatus[];
|
|
@@ -82,6 +82,7 @@ var AxiosRequestBackend = /** @class */ (function () {
|
|
|
82
82
|
data: context.getParsedBody(),
|
|
83
83
|
headers: computedConfig.headers || {},
|
|
84
84
|
responseType: context.responseType,
|
|
85
|
+
withCredentials: computedConfig.includeCredentials,
|
|
85
86
|
cancelToken: new axios.CancelToken(function (cancellerFunc) {
|
|
86
87
|
canceler = cancellerFunc;
|
|
87
88
|
}),
|
|
@@ -172,6 +172,7 @@ var FetchRequestBackend = /** @class */ (function () {
|
|
|
172
172
|
method: context.method.toUpperCase(),
|
|
173
173
|
body: bodyJsonify ? JSON.stringify(body) : body,
|
|
174
174
|
headers: parsedHeaders,
|
|
175
|
+
credentials: context.computedConfig.includeCredentials ? "include" : undefined,
|
|
175
176
|
signal: abortSignal,
|
|
176
177
|
};
|
|
177
178
|
// edge doesn't support mode
|
package/esm/ApiTypes.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface RetryOptions {
|
|
|
31
31
|
export interface BaseRequestConfig {
|
|
32
32
|
cache?: number | boolean;
|
|
33
33
|
lock?: RequestLock;
|
|
34
|
+
includeCredentials?: boolean;
|
|
34
35
|
retry?: number | false | RetryOptions;
|
|
35
36
|
headers?: Readonly<Headers>;
|
|
36
37
|
acceptableStatus?: AcceptableStatus[];
|
|
@@ -47,6 +47,7 @@ export default class AxiosRequestBackend {
|
|
|
47
47
|
data: context.getParsedBody(),
|
|
48
48
|
headers: computedConfig.headers || {},
|
|
49
49
|
responseType: context.responseType,
|
|
50
|
+
withCredentials: computedConfig.includeCredentials,
|
|
50
51
|
cancelToken: new axios.CancelToken((cancellerFunc) => {
|
|
51
52
|
canceler = cancellerFunc;
|
|
52
53
|
}),
|
|
@@ -107,6 +107,7 @@ export default class FetchRequestBackend {
|
|
|
107
107
|
method: context.method.toUpperCase(),
|
|
108
108
|
body: bodyJsonify ? JSON.stringify(body) : body,
|
|
109
109
|
headers: parsedHeaders,
|
|
110
|
+
credentials: context.computedConfig.includeCredentials ? "include" : undefined,
|
|
110
111
|
signal: abortSignal,
|
|
111
112
|
};
|
|
112
113
|
// edge doesn't support mode
|