@gatling.io/http 0.1.1 → 3.11.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/package.json +4 -4
- package/target/cookies.d.ts +70 -0
- package/target/request/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gatling.io/http",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.11.2",
|
|
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": "
|
|
9
|
-
"@gatling.io/core": "
|
|
8
|
+
"@gatling.io/jvm-types": "3.11.2",
|
|
9
|
+
"@gatling.io/core": "3.11.2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/jest": "29.5.12",
|
|
13
13
|
"jest": "29.7.0",
|
|
14
14
|
"prettier": "3.2.5",
|
|
15
|
-
"rimraf": "5.0.
|
|
15
|
+
"rimraf": "5.0.7",
|
|
16
16
|
"ts-jest": "29.1.2",
|
|
17
17
|
"ts-node": "10.9.2",
|
|
18
18
|
"typescript": "5.4.5"
|
package/target/cookies.d.ts
CHANGED
|
@@ -1,17 +1,87 @@
|
|
|
1
1
|
import { ActionBuilder, Session, Wrapper } from "@gatling.io/core";
|
|
2
2
|
import JvmAddCookie = io.gatling.javaapi.http.AddCookie;
|
|
3
3
|
import JvmGetCookie = io.gatling.javaapi.http.GetCookie;
|
|
4
|
+
/**
|
|
5
|
+
* DSL for adding a <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies">cookie</a>
|
|
6
|
+
* in the virtual user's CookieJar instead of having the server send a Set-Cookie header.
|
|
7
|
+
*
|
|
8
|
+
* <p>Immutable, so all methods return a new occurrence and leave the original unmodified.
|
|
9
|
+
*/
|
|
4
10
|
export interface AddCookie extends Wrapper<JvmAddCookie> {
|
|
11
|
+
/**
|
|
12
|
+
* Define the domain of the cookie. If undefined, will try to use the domain of {@link
|
|
13
|
+
* HttpProtocolBuilder#baseUrl(String)}
|
|
14
|
+
*
|
|
15
|
+
* @param domain - the cookie domain
|
|
16
|
+
* @returns a new AddCookie
|
|
17
|
+
*/
|
|
5
18
|
withDomain(domain: string): AddCookie;
|
|
19
|
+
/**
|
|
20
|
+
* Define the path of the cookie.
|
|
21
|
+
*
|
|
22
|
+
* @param path - the cookie path
|
|
23
|
+
* @returns a new AddCookie
|
|
24
|
+
*/
|
|
6
25
|
withPath(path: string): AddCookie;
|
|
26
|
+
/**
|
|
27
|
+
* Define the maxAge attribute of the cookie.
|
|
28
|
+
*
|
|
29
|
+
* @param maxAge - the cookie maxAge
|
|
30
|
+
* @returns a new AddCookie
|
|
31
|
+
*/
|
|
7
32
|
withMaxAge(maxAge: number): AddCookie;
|
|
33
|
+
/**
|
|
34
|
+
* Define the secure attribute of the cookie.
|
|
35
|
+
*
|
|
36
|
+
* @param secure - if the cookie must only be sent with HTTPS requests
|
|
37
|
+
* @returns a new AddCookie
|
|
38
|
+
*/
|
|
8
39
|
withSecure(secure: boolean): AddCookie;
|
|
9
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* DSL for fetching the value of a <a
|
|
43
|
+
* href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies">cookie</a> from the virtual
|
|
44
|
+
* user's CookieJar into its {@link Session}.
|
|
45
|
+
*
|
|
46
|
+
* <p>Immutable, so all methods return a new occurrence and leave the original unmodified.
|
|
47
|
+
*/
|
|
10
48
|
export interface GetCookie extends Wrapper<JvmGetCookie> {
|
|
49
|
+
/**
|
|
50
|
+
* Define the domain of the cookie. If undefined, will try to use the domain of {@link
|
|
51
|
+
* HttpProtocolBuilder#baseUrl(String)}
|
|
52
|
+
*
|
|
53
|
+
* @param domain - the cookie domain, expressed as a Gatling Expression Language String
|
|
54
|
+
* @returns a new GetCookie
|
|
55
|
+
*/
|
|
11
56
|
withDomain(domain: string): GetCookie;
|
|
57
|
+
/**
|
|
58
|
+
* Define the domain of the cookie. If undefined, will try to use the domain of {@link
|
|
59
|
+
* HttpProtocolBuilder#baseUrl(String)}
|
|
60
|
+
*
|
|
61
|
+
* @param domain - the cookie domain, expressed as a function
|
|
62
|
+
* @returns a new GetCookie
|
|
63
|
+
*/
|
|
12
64
|
withDomain(domain: (session: Session) => string): GetCookie;
|
|
65
|
+
/**
|
|
66
|
+
* Define the path of the cookie.
|
|
67
|
+
*
|
|
68
|
+
* @param path - the cookie path
|
|
69
|
+
* @returns a new GetCookie
|
|
70
|
+
*/
|
|
13
71
|
withPath(path: string): GetCookie;
|
|
72
|
+
/**
|
|
73
|
+
* Define the secure attribute of the cookie.
|
|
74
|
+
*
|
|
75
|
+
* @param secure - the cookie secure attribute
|
|
76
|
+
* @returns a new GetCookie
|
|
77
|
+
*/
|
|
14
78
|
withSecure(secure: boolean): GetCookie;
|
|
79
|
+
/**
|
|
80
|
+
* Define the {@link Session} key to save the cookie value. If undefined, will use the cookie name
|
|
81
|
+
*
|
|
82
|
+
* @param saveAs - the key
|
|
83
|
+
* @returns a new GetCookie
|
|
84
|
+
*/
|
|
15
85
|
saveAs(saveAs: string): GetCookie;
|
|
16
86
|
}
|
|
17
87
|
/**
|
package/target/request/index.js
CHANGED
|
@@ -169,7 +169,7 @@ const requestWithBodyActionBuilderImpl = (jvmBuilder, wrap) => ({
|
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
171
|
formParamMap: (map) => wrap(typeof map === "function"
|
|
172
|
-
? jvmBuilder
|
|
172
|
+
? jvmBuilder["formParamMap(java.util.function.Function)"]((0, core_1.wrapCallback)((0, core_1.underlyingSessionToJava)(map)))
|
|
173
173
|
: jvmBuilder.formParamMap(map)),
|
|
174
174
|
form: (form) => wrap(typeof form === "function"
|
|
175
175
|
? jvmBuilder.form((0, core_1.wrapCallback)((0, core_1.underlyingSessionToJava)(form)))
|