You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| method | string | HTTP method. Must be uppercase (GET, POST, PUT, PATCH, OPTIONS, HEAD, etc) |
14
+
| url | string | HTTP URL. If baseURL is set, provide only path. |
15
+
| body (optional) | null / string / object / ArrayBuffer / [SharedArray](/javascript-api/k6-data/sharedarray)| Request body; objects will be `x-www-form-urlencoded`. Set to `null` to omit the body. |
16
+
| params (optional) | null or object {} | Additional [parameters](/javascript-api/k6-http/params) for this specific request. |
Copy file name to clipboardExpand all lines: src/data/markdown/docs/20 jslib/01 jslib/02 httpx/09 request(method, url, [body], [params]).md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,12 @@ Generic method for making arbitrary HTTP requests.
10
10
Consider using specific methods for making common requests ([get](/javascript-api/jslib/httpx/get), [post](/javascript-api/jslib/httpx/post), [put](/javascript-api/jslib/httpx/put), [patch](/javascript-api/jslib/httpx/patch))
| method | string | HTTP method. Note, the method must be uppercase (GET, POST, PUT, PATCH, OPTIONS, HEAD, etc) |
16
-
| url | string | HTTP URL. If baseURL is set, provide only path. |
17
-
| body (optional) | null / string / object / ArrayBuffer / [SharedArray](/javascript-api/k6-data/sharedarray)| Request body; objects will be `x-www-form-urlencoded`. Set to `null` to omit the body.|
18
-
| params (optional) | null or object {} | Additional [parameters](/javascript-api/k6-http/params) for this specific request. |
| method | string | HTTP method. Must be uppercase (GET, POST, PUT, PATCH, OPTIONS, HEAD, etc) |
16
+
| url | string | HTTP URL. If baseURL is set, provide only path.|
17
+
| body (optional) | null / string / object / ArrayBuffer / [SharedArray](/javascript-api/k6-data/sharedarray)| Request body; objects are `x-www-form-urlencoded`. To omit body, set to `null`. |
18
+
| params (optional) | null or object {} | Additional [parameters](/javascript-api/k6-http/params) for this specific request.|
19
19
20
20
21
21
### Returns
@@ -30,7 +30,7 @@ Consider using specific methods for making common requests ([get](/javascript-ap
| url | string | HTTP URL. If baseURL is set, provide only path. |
12
-
| body (optional) | null / string / object / ArrayBuffer / [SharedArray](/javascript-api/k6-data/sharedarray)| Request body; objects will be `x-www-form-urlencoded`. Set to `null`to omit the body. |
13
-
| params (optional) | null or object {} | Additional [parameters](/javascript-api/k6-http/params) for this specific request. |
| url | string | HTTP URL. If baseURL is set, provide only path. |
14
-
| body (optional) | null / string / object / ArrayBuffer / [SharedArray](/javascript-api/k6-data/sharedarray)| Request body; objects will be `x-www-form-urlencoded`. Set to `null` to omit the body. |
15
-
| params (optional) | null or object {} | Additional [parameters](/javascript-api/k6-http/params) for this specific request. |
| url | string | HTTP URL. If baseURL is set, provide only path.|
14
+
| body (optional) | null / string / object / ArrayBuffer / [SharedArray](/javascript-api/k6-data/sharedarray)| Request body; objects are `x-www-form-urlencoded`. To omit body, set to `null`. |
15
+
| params (optional) | null or object {} | Additional [parameters](/javascript-api/k6-http/params) for this specific request.|
0 commit comments