diff --git a/docs/sources/next/javascript-api/k6-http/params.md b/docs/sources/next/javascript-api/k6-http/params.md index b0b45db02..122dabf05 100644 --- a/docs/sources/next/javascript-api/k6-http/params.md +++ b/docs/sources/next/javascript-api/k6-http/params.md @@ -18,9 +18,9 @@ _Params_ is an object used by the http.\* methods that generate HTTP requests. _ | `Params.redirects` | number | The number of redirects to follow for this request. Overrides the global test option [`maxRedirects`](https://grafana.com/docs/k6//using-k6/k6-options/reference). | | `Params.tags` | object | Key-value pairs where the keys are names of tags and the values are tag values. Response time metrics generated as a result of the request will have these tags added to them, allowing the user to filter out those results specifically, when looking at results data. | | `Params.timeout` | string / number | Maximum time to wait for the request to complete. Default timeout is 60 seconds (`"60s"`).
The type can also be a number, in which case k6 interprets it as milliseconds, e.g., `60000` is equivalent to `"60s"`. | -| `Params.compression` | string | Sets whether the request body should be compressed. If set to `gzip` it will use gzip to compress the body and set the appropriate `Content-Length` and `Content-Encoding` headers.

Possible values: `gzip`, `deflate`, `br`, `zstd`, and any comma-separated combination of them (for stacked compression) | +| `Params.compression` | string | Sets whether the request body should be compressed. If set to `gzip` it will use gzip to compress the body and set the appropriate `Content-Length` and `Content-Encoding` headers.

Possible values: `gzip`, `deflate`, `br`, `zstd`, and any comma-separated combination of them (for stacked compression). The default is no compression. | | `Params.responseType` | string | ResponseType is used to specify how to treat the body of the response. The three options are:
- text: k6 will return it as a string. This might not be what you want in cases of binary data as the conversation to UTF-16 will probably break it. This is also the default if
[discardResponseBodies](https://grafana.com/docs/k6//using-k6/k6-options/reference) is set to false or not set at all.
- `binary`: k6 will return an ArrayBuffer object
- `none`: k6 will return null as the body. The whole body will be ignored. This is the default when [discardResponseBodies](https://grafana.com/docs/k6//using-k6/k6-options/reference) is set to true. | -| `Params.responseCallback` | [expectedStatuses](https://grafana.com/docs/k6//javascript-api/k6-http/expected-statuses) | sets a [responseCallback](https://grafana.com/docs/k6//javascript-api/k6-http/set-response-callback) only for this request. For performance reasons it's better to initialize it once and reference it for each time the same callback will need to be used | +| `Params.responseCallback` | [expectedStatuses](https://grafana.com/docs/k6//javascript-api/k6-http/expected-statuses) | sets a [responseCallback](https://grafana.com/docs/k6//javascript-api/k6-http/set-response-callback) only for this request. For performance reasons it's better to initialize it once and reference it for each time the same callback will need to be used. | ### Example of custom HTTP headers and tags diff --git a/docs/sources/v0.52.x/javascript-api/k6-http/params.md b/docs/sources/v0.52.x/javascript-api/k6-http/params.md index b0b45db02..122dabf05 100644 --- a/docs/sources/v0.52.x/javascript-api/k6-http/params.md +++ b/docs/sources/v0.52.x/javascript-api/k6-http/params.md @@ -18,9 +18,9 @@ _Params_ is an object used by the http.\* methods that generate HTTP requests. _ | `Params.redirects` | number | The number of redirects to follow for this request. Overrides the global test option [`maxRedirects`](https://grafana.com/docs/k6//using-k6/k6-options/reference). | | `Params.tags` | object | Key-value pairs where the keys are names of tags and the values are tag values. Response time metrics generated as a result of the request will have these tags added to them, allowing the user to filter out those results specifically, when looking at results data. | | `Params.timeout` | string / number | Maximum time to wait for the request to complete. Default timeout is 60 seconds (`"60s"`).
The type can also be a number, in which case k6 interprets it as milliseconds, e.g., `60000` is equivalent to `"60s"`. | -| `Params.compression` | string | Sets whether the request body should be compressed. If set to `gzip` it will use gzip to compress the body and set the appropriate `Content-Length` and `Content-Encoding` headers.

Possible values: `gzip`, `deflate`, `br`, `zstd`, and any comma-separated combination of them (for stacked compression) | +| `Params.compression` | string | Sets whether the request body should be compressed. If set to `gzip` it will use gzip to compress the body and set the appropriate `Content-Length` and `Content-Encoding` headers.

Possible values: `gzip`, `deflate`, `br`, `zstd`, and any comma-separated combination of them (for stacked compression). The default is no compression. | | `Params.responseType` | string | ResponseType is used to specify how to treat the body of the response. The three options are:
- text: k6 will return it as a string. This might not be what you want in cases of binary data as the conversation to UTF-16 will probably break it. This is also the default if
[discardResponseBodies](https://grafana.com/docs/k6//using-k6/k6-options/reference) is set to false or not set at all.
- `binary`: k6 will return an ArrayBuffer object
- `none`: k6 will return null as the body. The whole body will be ignored. This is the default when [discardResponseBodies](https://grafana.com/docs/k6//using-k6/k6-options/reference) is set to true. | -| `Params.responseCallback` | [expectedStatuses](https://grafana.com/docs/k6//javascript-api/k6-http/expected-statuses) | sets a [responseCallback](https://grafana.com/docs/k6//javascript-api/k6-http/set-response-callback) only for this request. For performance reasons it's better to initialize it once and reference it for each time the same callback will need to be used | +| `Params.responseCallback` | [expectedStatuses](https://grafana.com/docs/k6//javascript-api/k6-http/expected-statuses) | sets a [responseCallback](https://grafana.com/docs/k6//javascript-api/k6-http/set-response-callback) only for this request. For performance reasons it's better to initialize it once and reference it for each time the same callback will need to be used. | ### Example of custom HTTP headers and tags