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
You can extract values from the request itself or from the response to it (`request|response`). For either request or response, you can extract values from the body or the headers (`body|headers`).
216
+
This syntax lets you extract values from the request itself or from the response to it (`request|response`). For either request or response, you can extract values from the body or the headers (`body|headers`).
217
217
218
-
For the body (`*|JSONPath|XPath`):
218
+
When `body` is selected, the `*|JSONPath|XPath` part of the syntax applies:
219
219
220
220
*`*` extracts the entire response body.
221
+
222
+
Example: `{{login.response.body.*}}`
223
+
221
224
* For JSON responses, use [JSONPath](https://www.rfc-editor.org/rfc/rfc9535.html) to extract a specific property or attribute.
225
+
226
+
Example: `{{login.response.body.$.token}}`
227
+
222
228
* For XML responses, use [XPath](https://www.w3schools.com/xml/xpath_syntax.asp) to extract a specific property or attribute.
223
229
224
-
Header name extracts the entire header. Header names are case-insensitive.
230
+
Example: `{{login.response.body./token}}`
231
+
232
+
When `headers` is selected, a header name extracts the entire header. Header names are case-insensitive.
233
+
234
+
Example: `{{login.response.headers.Location}}`
225
235
226
-
If you want to refer to the response of a named request, you need to manually trigger the named request to retrieve its response first. When you extract from the response, you'll get the latest response if the request has been sent more than once.
236
+
If you want to refer to the response of a named request, you need to manually trigger the named request to retrieve its response first. When you extract values from the response, you'll get the latest response if the request has been sent more than once.
0 commit comments