@gatling.io/http 3.11.3 → 3.11.4-M2
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/package.json +3 -3
- package/target/bodyPart.js +17 -17
- package/target/checks.js +5 -5
- package/target/cookies.js +5 -9
- package/target/index.js +9 -9
- package/target/protocol.js +21 -21
- package/target/request/index.js +30 -34
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gatling.io/http",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.4-M2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "target/index.js",
|
|
6
6
|
"types": "target/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@gatling.io/jvm-types": "3.11.
|
|
9
|
-
"@gatling.io/core": "3.11.
|
|
8
|
+
"@gatling.io/jvm-types": "3.11.4-M2",
|
|
9
|
+
"@gatling.io/core": "3.11.4-M2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/jest": "29.5.12",
|
package/target/bodyPart.js
CHANGED
|
@@ -6,32 +6,32 @@ const jvm_types_1 = require("@gatling.io/jvm-types");
|
|
|
6
6
|
const wrapBodyPart = (_underlying) => ({
|
|
7
7
|
_underlying,
|
|
8
8
|
contentType: (contentType) => (0, exports.wrapBodyPart)(typeof contentType === "function"
|
|
9
|
-
? _underlying.contentType((0, core_1.
|
|
9
|
+
? _underlying.contentType((0, core_1.underlyingSessionTo)(contentType))
|
|
10
10
|
: _underlying.contentType(contentType)),
|
|
11
11
|
charset: (charset) => (0, exports.wrapBodyPart)(_underlying.charset(charset)),
|
|
12
12
|
dispositionType: (dispositionType) => (0, exports.wrapBodyPart)(typeof dispositionType === "function"
|
|
13
|
-
? _underlying.dispositionType((0, core_1.
|
|
13
|
+
? _underlying.dispositionType((0, core_1.underlyingSessionTo)(dispositionType))
|
|
14
14
|
: _underlying.dispositionType(dispositionType)),
|
|
15
15
|
fileName: (fileName) => (0, exports.wrapBodyPart)(typeof fileName === "function"
|
|
16
|
-
? _underlying.fileName((0, core_1.
|
|
16
|
+
? _underlying.fileName((0, core_1.underlyingSessionTo)(fileName))
|
|
17
17
|
: _underlying.fileName(fileName)),
|
|
18
18
|
contentId: (contentId) => (0, exports.wrapBodyPart)(typeof contentId == "function"
|
|
19
|
-
? _underlying.contentId((0, core_1.
|
|
19
|
+
? _underlying.contentId((0, core_1.underlyingSessionTo)(contentId))
|
|
20
20
|
: _underlying.contentId(contentId)),
|
|
21
21
|
transferEncoding: (transferEncoding) => (0, exports.wrapBodyPart)(_underlying.transferEncoding(transferEncoding)),
|
|
22
22
|
header: (name, value) => (0, exports.wrapBodyPart)(typeof name === "function"
|
|
23
23
|
? typeof value === "function"
|
|
24
|
-
? _underlying.header((0, core_1.
|
|
25
|
-
: _underlying.header((0, core_1.
|
|
24
|
+
? _underlying.header((0, core_1.underlyingSessionTo)(name), (0, core_1.underlyingSessionTo)(value))
|
|
25
|
+
: _underlying.header((0, core_1.underlyingSessionTo)(name), value)
|
|
26
26
|
: typeof value === "function"
|
|
27
|
-
? _underlying.header(name, (0, core_1.
|
|
27
|
+
? _underlying.header(name, (0, core_1.underlyingSessionTo)(value))
|
|
28
28
|
: _underlying.header(name, value))
|
|
29
29
|
});
|
|
30
30
|
exports.wrapBodyPart = wrapBodyPart;
|
|
31
31
|
const bodyPartImpl = (jvmBodyPart) => (arg0, arg1) => {
|
|
32
32
|
if (arg1 === undefined) {
|
|
33
33
|
if (typeof arg0 === "function") {
|
|
34
|
-
return (0, exports.wrapBodyPart)(jvmBodyPart((0, core_1.
|
|
34
|
+
return (0, exports.wrapBodyPart)(jvmBodyPart((0, core_1.underlyingSessionTo)(arg0)));
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
37
|
return (0, exports.wrapBodyPart)(jvmBodyPart(arg0));
|
|
@@ -40,15 +40,15 @@ const bodyPartImpl = (jvmBodyPart) => (arg0, arg1) => {
|
|
|
40
40
|
else {
|
|
41
41
|
if (typeof arg0 === "function") {
|
|
42
42
|
if (typeof arg1 === "function") {
|
|
43
|
-
return (0, exports.wrapBodyPart)(jvmBodyPart((0, core_1.
|
|
43
|
+
return (0, exports.wrapBodyPart)(jvmBodyPart((0, core_1.underlyingSessionTo)(arg0), (0, core_1.underlyingSessionTo)(arg1)));
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
return (0, exports.wrapBodyPart)(jvmBodyPart((0, core_1.
|
|
46
|
+
return (0, exports.wrapBodyPart)(jvmBodyPart((0, core_1.underlyingSessionTo)(arg0), arg1));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
50
|
if (typeof arg1 === "function") {
|
|
51
|
-
return (0, exports.wrapBodyPart)(jvmBodyPart(arg0, (0, core_1.
|
|
51
|
+
return (0, exports.wrapBodyPart)(jvmBodyPart(arg0, (0, core_1.underlyingSessionTo)(arg1)));
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
54
|
return (0, exports.wrapBodyPart)(jvmBodyPart(arg0, arg1));
|
|
@@ -75,7 +75,7 @@ const PebbleStringBodyPart = (arg0, arg1) => {
|
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
77
|
if (typeof arg0 === "function") {
|
|
78
|
-
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.PebbleStringBodyPart((0, core_1.
|
|
78
|
+
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.PebbleStringBodyPart((0, core_1.underlyingSessionTo)(arg0), arg1));
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
81
81
|
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.PebbleStringBodyPart(arg0, arg1));
|
|
@@ -86,24 +86,24 @@ exports.PebbleStringBodyPart = PebbleStringBodyPart;
|
|
|
86
86
|
const ByteArrayBodyPart = (arg0, arg1) => {
|
|
87
87
|
if (typeof arg0 === "function") {
|
|
88
88
|
if (typeof arg1 === "function") {
|
|
89
|
-
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart((0, core_1.
|
|
89
|
+
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart((0, core_1.underlyingSessionTo)(arg0), (0, core_1.underlyingSessionTo)(arg1)));
|
|
90
90
|
}
|
|
91
91
|
else if (typeof arg1 === "string") {
|
|
92
|
-
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart((0, core_1.
|
|
92
|
+
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart((0, core_1.underlyingSessionTo)(arg0), arg1));
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
|
-
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart((0, core_1.
|
|
95
|
+
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart((0, core_1.underlyingSessionTo)(arg0), arg1));
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
99
|
if (typeof arg1 === "function") {
|
|
100
|
-
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart(arg0, (0, core_1.
|
|
100
|
+
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart(arg0, (0, core_1.underlyingSessionTo)(arg1)));
|
|
101
101
|
}
|
|
102
102
|
else if (typeof arg1 === "string") {
|
|
103
103
|
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart(arg0, arg1));
|
|
104
104
|
}
|
|
105
105
|
else {
|
|
106
|
-
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart(arg0,
|
|
106
|
+
return (0, exports.wrapBodyPart)(jvm_types_1.HttpDsl.ByteArrayBodyPart(arg0, arg1));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
};
|
package/target/checks.js
CHANGED
|
@@ -12,17 +12,17 @@ const core_1 = require("@gatling.io/core");
|
|
|
12
12
|
const currentLocation = () => (0, core_1.wrapCheckBuilderFind)(jvm_types_1.HttpDsl.currentLocation());
|
|
13
13
|
exports.currentLocation = currentLocation;
|
|
14
14
|
const currentLocationRegex = (pattern) => (0, core_1.wrapCheckBuilderCaptureGroup)(typeof pattern === "function"
|
|
15
|
-
? jvm_types_1.HttpDsl.currentLocationRegex((0, core_1.
|
|
15
|
+
? jvm_types_1.HttpDsl.currentLocationRegex((0, core_1.underlyingSessionTo)(pattern))
|
|
16
16
|
: jvm_types_1.HttpDsl.currentLocationRegex(pattern));
|
|
17
17
|
exports.currentLocationRegex = currentLocationRegex;
|
|
18
|
-
const header = (name) => (0, core_1.wrapCheckBuilderMultipleFind)(typeof name === "function" ? jvm_types_1.HttpDsl.header((0, core_1.
|
|
18
|
+
const header = (name) => (0, core_1.wrapCheckBuilderMultipleFind)(typeof name === "function" ? jvm_types_1.HttpDsl.header((0, core_1.underlyingSessionTo)(name)) : jvm_types_1.HttpDsl.header(name));
|
|
19
19
|
exports.header = header;
|
|
20
20
|
const headerRegex = (name, pattern) => (0, core_1.wrapCheckBuilderCaptureGroup)(typeof name === "function"
|
|
21
21
|
? typeof pattern === "function"
|
|
22
|
-
? jvm_types_1.HttpDsl.headerRegex((0, core_1.
|
|
23
|
-
: jvm_types_1.HttpDsl.headerRegex((0, core_1.
|
|
22
|
+
? jvm_types_1.HttpDsl.headerRegex((0, core_1.underlyingSessionTo)(name), (0, core_1.underlyingSessionTo)(pattern))
|
|
23
|
+
: jvm_types_1.HttpDsl.headerRegex((0, core_1.underlyingSessionTo)(name), pattern)
|
|
24
24
|
: typeof pattern === "function"
|
|
25
|
-
? jvm_types_1.HttpDsl.headerRegex(name, (0, core_1.
|
|
25
|
+
? jvm_types_1.HttpDsl.headerRegex(name, (0, core_1.underlyingSessionTo)(pattern))
|
|
26
26
|
: // FIXME forced to use the charsequence version
|
|
27
27
|
jvm_types_1.HttpDsl.headerRegex(name, pattern));
|
|
28
28
|
exports.headerRegex = headerRegex;
|
package/target/cookies.js
CHANGED
|
@@ -12,9 +12,7 @@ const wrapAddCookie = (_underlying) => ({
|
|
|
12
12
|
});
|
|
13
13
|
const wrapGetCookie = (_underlying) => ({
|
|
14
14
|
_underlying,
|
|
15
|
-
withDomain: (domain) => wrapGetCookie(typeof domain === "function"
|
|
16
|
-
? _underlying.withDomain((0, core_1.wrapCallback)((0, core_1.underlyingSessionTo)(domain)))
|
|
17
|
-
: _underlying.withPath(domain)),
|
|
15
|
+
withDomain: (domain) => wrapGetCookie(typeof domain === "function" ? _underlying.withDomain((0, core_1.underlyingSessionTo)(domain)) : _underlying.withPath(domain)),
|
|
18
16
|
withPath: (path) => wrapGetCookie(_underlying.withPath(path)),
|
|
19
17
|
withSecure: (secure) => wrapGetCookie(_underlying.withSecure(secure)),
|
|
20
18
|
saveAs: (saveAs) => wrapGetCookie(_underlying.saveAs(saveAs))
|
|
@@ -58,13 +56,11 @@ const flushHttpCache = () => (0, core_1.wrapActionBuilder)(jvm_types_1.HttpDsl.f
|
|
|
58
56
|
exports.flushHttpCache = flushHttpCache;
|
|
59
57
|
const Cookie = (name, value) => wrapAddCookie(typeof name === "function"
|
|
60
58
|
? typeof value === "function"
|
|
61
|
-
? jvm_types_1.HttpDsl.Cookie((0, core_1.
|
|
62
|
-
: jvm_types_1.HttpDsl.Cookie((0, core_1.
|
|
59
|
+
? jvm_types_1.HttpDsl.Cookie((0, core_1.underlyingSessionTo)(name), (0, core_1.underlyingSessionTo)(value))
|
|
60
|
+
: jvm_types_1.HttpDsl.Cookie((0, core_1.underlyingSessionTo)(name), value)
|
|
63
61
|
: typeof value === "function"
|
|
64
|
-
? jvm_types_1.HttpDsl.Cookie(name, (0, core_1.
|
|
62
|
+
? jvm_types_1.HttpDsl.Cookie(name, (0, core_1.underlyingSessionTo)(value))
|
|
65
63
|
: jvm_types_1.HttpDsl.Cookie(name, value));
|
|
66
64
|
exports.Cookie = Cookie;
|
|
67
|
-
const CookieKey = (name) => wrapGetCookie(typeof name === "function"
|
|
68
|
-
? jvm_types_1.HttpDsl.CookieKey((0, core_1.wrapCallback)((0, core_1.underlyingSessionTo)(name)))
|
|
69
|
-
: jvm_types_1.HttpDsl.CookieKey(name));
|
|
65
|
+
const CookieKey = (name) => wrapGetCookie(typeof name === "function" ? jvm_types_1.HttpDsl.CookieKey((0, core_1.underlyingSessionTo)(name)) : jvm_types_1.HttpDsl.CookieKey(name));
|
|
70
66
|
exports.CookieKey = CookieKey;
|
package/target/index.js
CHANGED
|
@@ -40,20 +40,20 @@ const httpProtocolBuilder = (0, protocol_1.wrapHttpProtocolBuilder)(
|
|
|
40
40
|
// HttpDsl.http doesn't get properly generated by java2ts because of conflicts with methods of the same name
|
|
41
41
|
Java.type("io.gatling.javaapi.http.HttpDsl").http);
|
|
42
42
|
const wrapHttp = (jvmHttp) => ({
|
|
43
|
-
get: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.get((0,
|
|
44
|
-
put: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.put((0,
|
|
45
|
-
post: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.post((0,
|
|
46
|
-
patch: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.patch((0,
|
|
47
|
-
head: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.head((0,
|
|
48
|
-
delete: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.delete((0,
|
|
49
|
-
options: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.options((0,
|
|
43
|
+
get: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.get((0, core_2.underlyingSessionTo)(url)) : jvmHttp.get(url)),
|
|
44
|
+
put: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.put((0, core_2.underlyingSessionTo)(url)) : jvmHttp.put(url)),
|
|
45
|
+
post: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.post((0, core_2.underlyingSessionTo)(url)) : jvmHttp.post(url)),
|
|
46
|
+
patch: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.patch((0, core_2.underlyingSessionTo)(url)) : jvmHttp.patch(url)),
|
|
47
|
+
head: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.head((0, core_2.underlyingSessionTo)(url)) : jvmHttp.head(url)),
|
|
48
|
+
delete: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.delete((0, core_2.underlyingSessionTo)(url)) : jvmHttp.delete(url)),
|
|
49
|
+
options: (url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function" ? jvmHttp.options((0, core_2.underlyingSessionTo)(url)) : jvmHttp.options(url)),
|
|
50
50
|
httpRequest: (method, url) => (0, request_1.wrapHttpRequestActionBuilder)(typeof url === "function"
|
|
51
|
-
? jvmHttp.httpRequest(method, (0,
|
|
51
|
+
? jvmHttp.httpRequest(method, (0, core_2.underlyingSessionTo)(url))
|
|
52
52
|
: jvmHttp.httpRequest(method, url))
|
|
53
53
|
});
|
|
54
54
|
const httpApply = (name) => {
|
|
55
55
|
// Handle overloading
|
|
56
|
-
const jvmHttp = typeof name === "string" ? jvm_types_1.HttpDsl.http(name) : jvm_types_1.HttpDsl.http((0,
|
|
56
|
+
const jvmHttp = typeof name === "string" ? jvm_types_1.HttpDsl.http(name) : jvm_types_1.HttpDsl.http((0, core_2.underlyingSessionTo)(name));
|
|
57
57
|
return wrapHttp(jvmHttp);
|
|
58
58
|
};
|
|
59
59
|
exports.http = Object.assign(httpApply, httpProtocolBuilder);
|
package/target/protocol.js
CHANGED
|
@@ -21,55 +21,55 @@ const wrapHttpProtocolBuilder = (_underlying) => ({
|
|
|
21
21
|
disableAutoReferer: () => (0, exports.wrapHttpProtocolBuilder)(_underlying.disableAutoReferer()),
|
|
22
22
|
disableCaching: () => (0, exports.wrapHttpProtocolBuilder)(_underlying.disableCaching()),
|
|
23
23
|
header: (name, value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
24
|
-
? _underlying.header(name, (0, core_1.
|
|
24
|
+
? _underlying.header(name, (0, core_1.underlyingSessionTo)(value))
|
|
25
25
|
: _underlying.header(name, value)),
|
|
26
26
|
headers: (headers) => (0, exports.wrapHttpProtocolBuilder)(_underlying.headers(headers)),
|
|
27
27
|
acceptHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
28
|
-
? _underlying.acceptHeader((0, core_1.
|
|
28
|
+
? _underlying.acceptHeader((0, core_1.underlyingSessionTo)(value))
|
|
29
29
|
: _underlying.acceptHeader(value)),
|
|
30
30
|
acceptCharsetHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
31
|
-
? _underlying.acceptCharsetHeader((0, core_1.
|
|
31
|
+
? _underlying.acceptCharsetHeader((0, core_1.underlyingSessionTo)(value))
|
|
32
32
|
: _underlying.acceptCharsetHeader(value)),
|
|
33
33
|
acceptEncodingHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
34
|
-
? _underlying.acceptEncodingHeader((0, core_1.
|
|
34
|
+
? _underlying.acceptEncodingHeader((0, core_1.underlyingSessionTo)(value))
|
|
35
35
|
: _underlying.acceptEncodingHeader(value)),
|
|
36
36
|
acceptLanguageHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
37
|
-
? _underlying.acceptLanguageHeader((0, core_1.
|
|
37
|
+
? _underlying.acceptLanguageHeader((0, core_1.underlyingSessionTo)(value))
|
|
38
38
|
: _underlying.acceptLanguageHeader(value)),
|
|
39
39
|
authorizationHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
40
|
-
? _underlying.authorizationHeader((0, core_1.
|
|
40
|
+
? _underlying.authorizationHeader((0, core_1.underlyingSessionTo)(value))
|
|
41
41
|
: _underlying.authorizationHeader(value)),
|
|
42
42
|
connectionHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
43
|
-
? _underlying.connectionHeader((0, core_1.
|
|
43
|
+
? _underlying.connectionHeader((0, core_1.underlyingSessionTo)(value))
|
|
44
44
|
: _underlying.connectionHeader(value)),
|
|
45
45
|
contentTypeHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
46
|
-
? _underlying.contentTypeHeader((0, core_1.
|
|
46
|
+
? _underlying.contentTypeHeader((0, core_1.underlyingSessionTo)(value))
|
|
47
47
|
: _underlying.contentTypeHeader(value)),
|
|
48
48
|
doNotTrackHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
49
|
-
? _underlying.doNotTrackHeader((0, core_1.
|
|
49
|
+
? _underlying.doNotTrackHeader((0, core_1.underlyingSessionTo)(value))
|
|
50
50
|
: _underlying.doNotTrackHeader(value)),
|
|
51
51
|
originHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
52
|
-
? _underlying.originHeader((0, core_1.
|
|
52
|
+
? _underlying.originHeader((0, core_1.underlyingSessionTo)(value))
|
|
53
53
|
: _underlying.originHeader(value)),
|
|
54
54
|
userAgentHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
55
|
-
? _underlying.userAgentHeader((0, core_1.
|
|
55
|
+
? _underlying.userAgentHeader((0, core_1.underlyingSessionTo)(value))
|
|
56
56
|
: _underlying.userAgentHeader(value)),
|
|
57
57
|
upgradeInsecureRequestsHeader: (value) => (0, exports.wrapHttpProtocolBuilder)(typeof value === "function"
|
|
58
|
-
? _underlying.upgradeInsecureRequestsHeader((0, core_1.
|
|
58
|
+
? _underlying.upgradeInsecureRequestsHeader((0, core_1.underlyingSessionTo)(value))
|
|
59
59
|
: _underlying.upgradeInsecureRequestsHeader(value)),
|
|
60
60
|
basicAuth: (username, password) => (0, exports.wrapHttpProtocolBuilder)(typeof username === "function"
|
|
61
61
|
? typeof password === "function"
|
|
62
|
-
? _underlying.basicAuth((0, core_1.
|
|
63
|
-
: _underlying.basicAuth((0, core_1.
|
|
62
|
+
? _underlying.basicAuth((0, core_1.underlyingSessionTo)(username), (0, core_1.underlyingSessionTo)(password))
|
|
63
|
+
: _underlying.basicAuth((0, core_1.underlyingSessionTo)(username), password)
|
|
64
64
|
: typeof password === "function"
|
|
65
|
-
? _underlying.basicAuth(username, (0, core_1.
|
|
65
|
+
? _underlying.basicAuth(username, (0, core_1.underlyingSessionTo)(password))
|
|
66
66
|
: _underlying.basicAuth(username, password)),
|
|
67
67
|
digestAuth: (username, password) => (0, exports.wrapHttpProtocolBuilder)(typeof username === "function"
|
|
68
68
|
? typeof password === "function"
|
|
69
|
-
? _underlying.digestAuth((0, core_1.
|
|
70
|
-
: _underlying.digestAuth((0, core_1.
|
|
69
|
+
? _underlying.digestAuth((0, core_1.underlyingSessionTo)(username), (0, core_1.underlyingSessionTo)(password))
|
|
70
|
+
: _underlying.digestAuth((0, core_1.underlyingSessionTo)(username), password)
|
|
71
71
|
: typeof password === "function"
|
|
72
|
-
? _underlying.digestAuth(username, (0, core_1.
|
|
72
|
+
? _underlying.digestAuth(username, (0, core_1.underlyingSessionTo)(password))
|
|
73
73
|
: _underlying.digestAuth(username, password)),
|
|
74
74
|
silentResources: () => (0, exports.wrapHttpProtocolBuilder)(_underlying.silentResources()),
|
|
75
75
|
silentUri: (pattern) => (0, exports.wrapHttpProtocolBuilder)(_underlying.silentUri(pattern)),
|
|
@@ -81,8 +81,8 @@ const wrapHttpProtocolBuilder = (_underlying) => ({
|
|
|
81
81
|
typeof token === "function" &&
|
|
82
82
|
typeof tokenSecret === "function"
|
|
83
83
|
? typeof useAuthorizationHeader !== "undefined"
|
|
84
|
-
? _underlying.signWithOAuth1((0, core_1.
|
|
85
|
-
: _underlying.signWithOAuth1((0, core_1.
|
|
84
|
+
? _underlying.signWithOAuth1((0, core_1.underlyingSessionTo)(consumerKey), (0, core_1.underlyingSessionTo)(clientSharedSecret), (0, core_1.underlyingSessionTo)(token), (0, core_1.underlyingSessionTo)(tokenSecret), useAuthorizationHeader)
|
|
85
|
+
: _underlying.signWithOAuth1((0, core_1.underlyingSessionTo)(consumerKey), (0, core_1.underlyingSessionTo)(clientSharedSecret), (0, core_1.underlyingSessionTo)(token), (0, core_1.underlyingSessionTo)(tokenSecret))
|
|
86
86
|
: typeof useAuthorizationHeader !== "undefined"
|
|
87
87
|
? _underlying.signWithOAuth1(consumerKey, clientSharedSecret, token, tokenSecret, useAuthorizationHeader)
|
|
88
88
|
: _underlying.signWithOAuth1(consumerKey, clientSharedSecret, token, tokenSecret)),
|
|
@@ -97,7 +97,7 @@ const wrapHttpProtocolBuilder = (_underlying) => ({
|
|
|
97
97
|
check: (...checks) => (0, exports.wrapHttpProtocolBuilder)(_underlying.check(checks.map((c) => c._underlying))),
|
|
98
98
|
checkIf: (condition) => (0, core_1.wrapCondition)(typeof condition === "string"
|
|
99
99
|
? _underlying.checkIf(condition)
|
|
100
|
-
: _underlying.checkIf((0, core_1.
|
|
100
|
+
: _underlying.checkIf((0, core_1.underlyingSessionTo)(condition)), exports.wrapHttpProtocolBuilder),
|
|
101
101
|
inferHtmlResources: (arg0, arg1) => (0, exports.wrapHttpProtocolBuilder)(arg0 !== undefined
|
|
102
102
|
? arg1 !== undefined
|
|
103
103
|
? _underlying.inferHtmlResources(arg0._underlying, arg1._underlying)
|
package/target/request/index.js
CHANGED
|
@@ -22,21 +22,21 @@ const requestWithParamsActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
22
22
|
queryParam: (name, value) => {
|
|
23
23
|
if (typeof name === "function") {
|
|
24
24
|
if (typeof value === "function") {
|
|
25
|
-
return wrap(jvmBuilder.queryParam((0, core_1.
|
|
25
|
+
return wrap(jvmBuilder.queryParam((0, core_1.underlyingSessionTo)(name), (0, core_1.underlyingSessionTo)(value)));
|
|
26
26
|
}
|
|
27
27
|
else if (typeof value === "string") {
|
|
28
28
|
// FIXME it shows the value:any overload?
|
|
29
|
-
return wrap(jvmBuilder.queryParam((0, core_1.
|
|
29
|
+
return wrap(jvmBuilder.queryParam((0, core_1.underlyingSessionTo)(name), value));
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
// FIXME it shows the value:func overload?
|
|
33
|
-
return wrap(jvmBuilder.queryParam((0, core_1.
|
|
33
|
+
return wrap(jvmBuilder.queryParam((0, core_1.underlyingSessionTo)(name), value));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
37
|
if (typeof value === "function") {
|
|
38
38
|
// FIXME it shows the value:any overload?
|
|
39
|
-
return wrap(jvmBuilder.queryParam(name, (0, core_1.
|
|
39
|
+
return wrap(jvmBuilder.queryParam(name, (0, core_1.underlyingSessionTo)(value)));
|
|
40
40
|
}
|
|
41
41
|
else if (typeof value === "string") {
|
|
42
42
|
// FIXME it shows the value:any overload?
|
|
@@ -50,18 +50,18 @@ const requestWithParamsActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
50
50
|
multivaluedQueryParam: (name, values) => {
|
|
51
51
|
if (typeof name === "function") {
|
|
52
52
|
if (typeof values === "function") {
|
|
53
|
-
return wrap(jvmBuilder.multivaluedQueryParam((0, core_1.
|
|
53
|
+
return wrap(jvmBuilder.multivaluedQueryParam((0, core_1.underlyingSessionTo)(name), (0, core_1.underlyingSessionToJava)(values)));
|
|
54
54
|
}
|
|
55
55
|
else if (typeof values === "string") {
|
|
56
|
-
return wrap(jvmBuilder.multivaluedQueryParam((0, core_1.
|
|
56
|
+
return wrap(jvmBuilder.multivaluedQueryParam((0, core_1.underlyingSessionTo)(name), values));
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
|
-
return wrap(jvmBuilder.multivaluedQueryParam((0, core_1.
|
|
59
|
+
return wrap(jvmBuilder.multivaluedQueryParam((0, core_1.underlyingSessionTo)(name), values));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
if (typeof values === "function") {
|
|
64
|
-
return wrap(jvmBuilder.multivaluedQueryParam(name, (0, core_1.
|
|
64
|
+
return wrap(jvmBuilder.multivaluedQueryParam(name, (0, core_1.underlyingSessionToJava)(values)));
|
|
65
65
|
}
|
|
66
66
|
else if (typeof values === "string") {
|
|
67
67
|
return wrap(jvmBuilder.multivaluedQueryParam(name, values));
|
|
@@ -73,7 +73,7 @@ const requestWithParamsActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
73
73
|
},
|
|
74
74
|
queryParamMap: (map) => {
|
|
75
75
|
if (typeof map === "function") {
|
|
76
|
-
return wrap(jvmBuilder.queryParamMap((0, core_1.
|
|
76
|
+
return wrap(jvmBuilder.queryParamMap((0, core_1.underlyingSessionToJava)(map)));
|
|
77
77
|
}
|
|
78
78
|
else if (typeof map === "object") {
|
|
79
79
|
return wrap(jvmBuilder.queryParamMap(map));
|
|
@@ -82,24 +82,22 @@ const requestWithParamsActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
82
82
|
return wrap(jvmBuilder.queryParamMap(map));
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
header: (name, value) => wrap(typeof value === "function"
|
|
86
|
-
? jvmBuilder.header(name, (0, core_1.wrapCallback)((0, core_1.underlyingSessionTo)(value)))
|
|
87
|
-
: jvmBuilder.header(name, value)),
|
|
85
|
+
header: (name, value) => wrap(typeof value === "function" ? jvmBuilder.header(name, (0, core_1.underlyingSessionTo)(value)) : jvmBuilder.header(name, value)),
|
|
88
86
|
headers: (headers) => wrap(jvmBuilder.headers(headers)),
|
|
89
87
|
ignoreProtocolHeaders: () => wrap(jvmBuilder.ignoreProtocolHeaders()),
|
|
90
88
|
basicAuth: (username, password) => wrap(typeof username === "function"
|
|
91
89
|
? typeof password === "function"
|
|
92
|
-
? jvmBuilder.basicAuth((0, core_1.
|
|
93
|
-
: jvmBuilder.basicAuth((0, core_1.
|
|
90
|
+
? jvmBuilder.basicAuth((0, core_1.underlyingSessionTo)(username), (0, core_1.underlyingSessionTo)(password))
|
|
91
|
+
: jvmBuilder.basicAuth((0, core_1.underlyingSessionTo)(username), password)
|
|
94
92
|
: typeof password === "function"
|
|
95
|
-
? jvmBuilder.basicAuth(username, (0, core_1.
|
|
93
|
+
? jvmBuilder.basicAuth(username, (0, core_1.underlyingSessionTo)(password))
|
|
96
94
|
: jvmBuilder.basicAuth(username, password)),
|
|
97
95
|
digestAuth: (username, password) => wrap(typeof username === "function"
|
|
98
96
|
? typeof password === "function"
|
|
99
|
-
? jvmBuilder.digestAuth((0, core_1.
|
|
100
|
-
: jvmBuilder.digestAuth((0, core_1.
|
|
97
|
+
? jvmBuilder.digestAuth((0, core_1.underlyingSessionTo)(username), (0, core_1.underlyingSessionTo)(password))
|
|
98
|
+
: jvmBuilder.digestAuth((0, core_1.underlyingSessionTo)(username), password)
|
|
101
99
|
: typeof password === "function"
|
|
102
|
-
? jvmBuilder.digestAuth(username, (0, core_1.
|
|
100
|
+
? jvmBuilder.digestAuth(username, (0, core_1.underlyingSessionTo)(password))
|
|
103
101
|
: jvmBuilder.digestAuth(username, password)),
|
|
104
102
|
disableUrlEncoding: () => wrap(jvmBuilder.disableUrlEncoding()),
|
|
105
103
|
proxy: (proxy) => wrap(jvmBuilder.proxy(proxy._underlying)),
|
|
@@ -107,7 +105,7 @@ const requestWithParamsActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
107
105
|
typeof clientSharedSecret === "function" &&
|
|
108
106
|
typeof token === "function" &&
|
|
109
107
|
typeof tokenSecret === "function"
|
|
110
|
-
? jvmBuilder.signWithOAuth1((0, core_1.
|
|
108
|
+
? jvmBuilder.signWithOAuth1((0, core_1.underlyingSessionTo)(consumerKey), (0, core_1.underlyingSessionTo)(clientSharedSecret), (0, core_1.underlyingSessionTo)(token), (0, core_1.underlyingSessionTo)(tokenSecret))
|
|
111
109
|
: jvmBuilder.signWithOAuth1(consumerKey, clientSharedSecret, token, tokenSecret))
|
|
112
110
|
});
|
|
113
111
|
const requestWithBodyActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
@@ -119,21 +117,21 @@ const requestWithBodyActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
119
117
|
formParam: (key, value) => {
|
|
120
118
|
if (typeof key === "function") {
|
|
121
119
|
if (typeof value === "function") {
|
|
122
|
-
return wrap(jvmBuilder.formParam((0, core_1.
|
|
120
|
+
return wrap(jvmBuilder.formParam((0, core_1.underlyingSessionTo)(key), (0, core_1.underlyingSessionTo)(value)));
|
|
123
121
|
}
|
|
124
122
|
else if (typeof value === "string") {
|
|
125
123
|
// FIXME it shows the value:any overload?
|
|
126
|
-
return wrap(jvmBuilder.formParam((0, core_1.
|
|
124
|
+
return wrap(jvmBuilder.formParam((0, core_1.underlyingSessionTo)(key), value));
|
|
127
125
|
}
|
|
128
126
|
else {
|
|
129
127
|
// FIXME it shows the value:func overload?
|
|
130
|
-
return wrap(jvmBuilder.formParam((0, core_1.
|
|
128
|
+
return wrap(jvmBuilder.formParam((0, core_1.underlyingSessionTo)(key), value));
|
|
131
129
|
}
|
|
132
130
|
}
|
|
133
131
|
else {
|
|
134
132
|
if (typeof value === "function") {
|
|
135
133
|
// FIXME it shows the value:any overload?
|
|
136
|
-
return wrap(jvmBuilder.formParam(key, (0, core_1.
|
|
134
|
+
return wrap(jvmBuilder.formParam(key, (0, core_1.underlyingSessionTo)(value)));
|
|
137
135
|
}
|
|
138
136
|
else if (typeof value === "string") {
|
|
139
137
|
// FIXME it shows the value:any overload?
|
|
@@ -147,18 +145,18 @@ const requestWithBodyActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
147
145
|
multivaluedFormParam: (key, values) => {
|
|
148
146
|
if (typeof key === "function") {
|
|
149
147
|
if (typeof values === "function") {
|
|
150
|
-
return wrap(jvmBuilder.multivaluedFormParam((0, core_1.
|
|
148
|
+
return wrap(jvmBuilder.multivaluedFormParam((0, core_1.underlyingSessionTo)(key), (0, core_1.underlyingSessionToJava)(values)));
|
|
151
149
|
}
|
|
152
150
|
else if (typeof values === "string") {
|
|
153
151
|
throw Error(`multivaluedFormParam() called with invalid arguments ${key}, ${values}`);
|
|
154
152
|
}
|
|
155
153
|
else {
|
|
156
|
-
return wrap(jvmBuilder.multivaluedFormParam((0, core_1.
|
|
154
|
+
return wrap(jvmBuilder.multivaluedFormParam((0, core_1.underlyingSessionTo)(key), values));
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
else {
|
|
160
158
|
if (typeof values === "function") {
|
|
161
|
-
return wrap(jvmBuilder.multivaluedFormParam(key, (0, core_1.
|
|
159
|
+
return wrap(jvmBuilder.multivaluedFormParam(key, (0, core_1.underlyingSessionToJava)(values)));
|
|
162
160
|
}
|
|
163
161
|
else if (typeof values === "string") {
|
|
164
162
|
return wrap(jvmBuilder.multivaluedFormParam(key, values));
|
|
@@ -169,17 +167,15 @@ const requestWithBodyActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
169
167
|
}
|
|
170
168
|
},
|
|
171
169
|
formParamMap: (map) => wrap(typeof map === "function"
|
|
172
|
-
? jvmBuilder["formParamMap(java.util.function.Function)"]((0, core_1.
|
|
170
|
+
? jvmBuilder["formParamMap(java.util.function.Function)"]((0, core_1.underlyingSessionToJava)(map))
|
|
173
171
|
: jvmBuilder.formParamMap(map)),
|
|
174
|
-
form: (form) => wrap(typeof form === "function"
|
|
175
|
-
? jvmBuilder.form((0, core_1.wrapCallback)((0, core_1.underlyingSessionToJava)(form)))
|
|
176
|
-
: jvmBuilder.form(form)),
|
|
172
|
+
form: (form) => wrap(typeof form === "function" ? jvmBuilder.form((0, core_1.underlyingSessionToJava)(form)) : jvmBuilder.form(form)),
|
|
177
173
|
formUpload: (name, filePath) => wrap(typeof name === "function"
|
|
178
174
|
? typeof filePath === "function"
|
|
179
|
-
? jvmBuilder.formUpload((0, core_1.
|
|
180
|
-
: jvmBuilder.formUpload((0, core_1.
|
|
175
|
+
? jvmBuilder.formUpload((0, core_1.underlyingSessionTo)(name), (0, core_1.underlyingSessionTo)(filePath))
|
|
176
|
+
: jvmBuilder.formUpload((0, core_1.underlyingSessionTo)(name), filePath)
|
|
181
177
|
: typeof filePath === "function"
|
|
182
|
-
? jvmBuilder.formUpload(name, (0, core_1.
|
|
178
|
+
? jvmBuilder.formUpload(name, (0, core_1.underlyingSessionTo)(filePath))
|
|
183
179
|
: jvmBuilder.formUpload(name, filePath)),
|
|
184
180
|
asJson: () => wrap(jvmBuilder.asJson()),
|
|
185
181
|
asXml: () => wrap(jvmBuilder.asXml())
|
|
@@ -188,7 +184,7 @@ const requestActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
188
184
|
check: (...checks) => wrap(jvmBuilder.check(checks.map((c) => c._underlying))),
|
|
189
185
|
checkIf: (condition) => (0, core_1.wrapCondition)(typeof condition === "string"
|
|
190
186
|
? jvmBuilder.checkIf(condition)
|
|
191
|
-
: jvmBuilder.checkIf((0, core_1.
|
|
187
|
+
: jvmBuilder.checkIf((0, core_1.underlyingSessionTo)(condition)), wrap),
|
|
192
188
|
ignoreProtocolChecks: () => wrap(jvmBuilder.ignoreProtocolChecks()),
|
|
193
189
|
silent: () => wrap(jvmBuilder.silent()),
|
|
194
190
|
notSilent: () => wrap(jvmBuilder.notSilent()),
|