save_request
Store an HTTP request in Plunger's Saved list without sending it, so you can re-run it by name later with send_request. Use overwrite to replace an existing saved name.
Instructions
Save a request in the user's Saved list without sending it, so it can be re-run by name with send_request
(saved_request). Describe it like send_request. {{placeholders}} are kept as written, including in
Authorization headers. An existing name is refused unless overwrite is true, which replaces it, so a
mistake can be fixed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Full URL. May use {{variables}}, e.g. "{{base}}/users/{{id}}". Required unless saved_request is given. | |
| body | No | A raw text body, sent as-is. Use instead of `json` for non-JSON payloads. | |
| form | No | Form fields, sent as application/x-www-form-urlencoded. | |
| json | No | A JSON body (any JSON value). Sent with Content-Type: application/json. | |
| name | Yes | The name to save it under, shown in Plunger's Saved list. | |
| group | No | File it under a group, such as "Jira" or "Jira/Issues". Left out, a new request has no group and a replaced one keeps its group; an empty string takes it out of its group. | |
| method | No | GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS. Defaults to GET. | |
| select | No | Return only these values instead of the whole body, e.g. ["$.data[0].id", "header:Location", "status"]. Saves context on a big response; `json`, `body` and the headers are then left out. `[?(@.name=='Done')]` keeps the array items whose field equals the value. If every path fails the whole response is returned with the reasons; if only some fail, the values that could be read come back and `problems` names the rest. | |
| extract | No | Keep values from the response as variables for later requests, e.g. [{"name": "token", "from": "json:$.access_token"}]. `from` is `json:$.path`, `header:Name` or `status`. A name like token or password is kept as a hidden secret. | |
| headers | No | Request headers, e.g. {"Accept": "application/json", "Authorization": "Bearer {{token}}"}. A list of {"name", "value"} objects or "Name: value" strings is accepted too. | |
| overwrite | No | Replace a saved request that already has this name (otherwise an existing name is refused). | |
| variables | No | Extra or overriding {{variable}} values for this request only. The user's own variables (including secrets) are already available by name; you don't need their values. | |
| insecure_tls | No | Skip TLS certificate checks, e.g. for a local server with a self-signed certificate. | |
| timeout_secs | No | Seconds to wait for a response (1-600). Defaults to the user's setting (20). | |
| saved_request | No | Send a saved request by name (see list_saved_requests). Any other field given here overrides that part of it. | |
| max_body_chars | No | Longest body to return, in characters (default 50000). A longer JSON body comes back as an outline of its shape (keys, types, array lengths) with a hint to use `select`; a longer text body is cut and marked with `body_cut_from_chars`. | |
| include_headers | No | Which response headers to return: `all`, `none`, or `relevant` (location, link, retry-after, content-type, content-disposition, etag, rate-limit headers and set-cookie names). Left out: `all`, or `none` when `select` is used. | |
| follow_redirects | No | Follow redirects (default true). Set false to receive the redirect response itself and read its `Location` header. | |
| use_saved_bearer | No | Attach the Bearer token the user saved in Plunger. Off by default: only turn it on for a host the user asked you to call with their credentials. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| body | No | ||
| group | No | The group a saved request is filed under (`Jira`, `Jira/Issues`). | |
| method | Yes | ||
| headers | Yes | ||
| options | No | What a saved request carries besides its form: `timeout_secs`, `follow_redirects`, `insecure_tls` and `select`. They apply when it is sent by name, unless the call gives its own. | |
| saved_id | No | Set when saved under `save_as`; it now shows in Plunger's Saved list. | |
| body_type | Yes | none, json, form-data or raw. | |
| not_saved | No | Fields of the call that a saved request does not keep (only said when there are some). | |
| form_fields | No | multipart -F fields: "name=value" or "name=@file". | |
| variables_used | Yes | {{variables}} the request uses. |