Skip to content

Commit 416d1d7

Browse files
Small edit to response method
1 parent 186ea8a commit 416d1d7

File tree

2 files changed

+2
-4
lines changed
  • docs/sources
    • next/javascript-api/k6-http/response
    • v0.52.x/javascript-api/k6-http/response

2 files changed

+2
-4
lines changed

docs/sources/next/javascript-api/k6-http/response/_index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Note that in the case of redirects, all the information in the Response object w
1616
| `Response.cookies` | object | Response cookies. The object properties are the cookie names and the value is an array of cookie objects (with `name`, `value`, `domain`, `path`, `httpOnly`, `secure`, `maxAge` and `expires` fields). |
1717
| `Response.error` | string | Error message if there was a non-HTTP error while trying to send the request. |
1818
| `Response.error_code` | number | [Error code](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/error-codes) if there was a non-HTTP error or 4xx or 5xx HTTP error it will be set to a specific code that describes the error. (Added in 0.24.0) |
19-
| `Response.headers` | object | Key-value pairs representing all HTTP headers sent by the server. Note that the header names are in [canonical form](https://pkg.go.dev/net/http#CanonicalHeaderKey); for example, if the server responds with "accept-encoding", the key will be "Accept-Encoding". When requesting a header by a specific name, an array of strings is returned since the header can have multiple values. So you can access each value by its index - for the first value (or for single-valued header) that will be `Response.headers["my_key"][0]`.
20-
21-
|
19+
| `Response.headers` | object | Key-value pairs representing all HTTP headers sent by the server. Note that the header names are in [canonical form](https://pkg.go.dev/net/http#CanonicalHeaderKey); for example, if the server responds with "accept-encoding", the key will be "Accept-Encoding". When requesting a header by a specific name, an array of strings is returned since the header can have multiple values. You can access each value by its index - for the first value, or for single-valued header, that will be `Response.headers["my_key"][0]`. |
2220
| `Response.ocsp.produced_at` | number | If a stapled OSCP response was provided by server, the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this OCSP stapled response was signed by CA (or by CA entrusted OCSP responder) |
2321
| `Response.ocsp.this_update` | number | If a stapled OSCP response was provided by server, the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time at which the status being indicated was known to be correct. |
2422
| `Response.ocsp.next_update` | number | If a stapled OSCP response was provided by server, the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this OCSP stapled response will be refreshed with CA (or by CA entrusted OCSP responder). |

docs/sources/v0.52.x/javascript-api/k6-http/response/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Note that in the case of redirects, all the information in the Response object w
1616
| `Response.cookies` | object | Response cookies. The object properties are the cookie names and the value is an array of cookie objects (with `name`, `value`, `domain`, `path`, `httpOnly`, `secure`, `maxAge` and `expires` fields). |
1717
| `Response.error` | string | Error message if there was a non-HTTP error while trying to send the request. |
1818
| `Response.error_code` | number | [Error code](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/error-codes) if there was a non-HTTP error or 4xx or 5xx HTTP error it will be set to a specific code that describes the error. (Added in 0.24.0) |
19-
| `Response.headers` | object | Key-value pairs representing all HTTP headers sent by the server. Note that the header names are in [canonical form](https://pkg.go.dev/net/http#CanonicalHeaderKey); for example, if the server responds with "accept-encoding", the key will be "Accept-Encoding". When requesting a header by a specific name, an array of strings is returned since the header can have multiple values. So you can access each value by its index - for the first value (or for single-valued header) that will be `Response.headers["my_key"][0]`. |
19+
| `Response.headers` | object | Key-value pairs representing all HTTP headers sent by the server. Note that the header names are in [canonical form](https://pkg.go.dev/net/http#CanonicalHeaderKey); for example, if the server responds with "accept-encoding", the key will be "Accept-Encoding". When requesting a header by a specific name, an array of strings is returned since the header can have multiple values. You can access each value by its index - for the first value, or for single-valued header, that will be `Response.headers["my_key"][0]`. |
2020
| `Response.ocsp.produced_at` | number | If a stapled OSCP response was provided by server, the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this OCSP stapled response was signed by CA (or by CA entrusted OCSP responder) |
2121
| `Response.ocsp.this_update` | number | If a stapled OSCP response was provided by server, the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time at which the status being indicated was known to be correct. |
2222
| `Response.ocsp.next_update` | number | If a stapled OSCP response was provided by server, the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this OCSP stapled response will be refreshed with CA (or by CA entrusted OCSP responder). |

0 commit comments

Comments
 (0)