Skip to content
gurl edit

gurl edit

Change fields of a saved request from the command line. Only the fields you pass are changed; gurl prints the list of changes.

Synopsis

gurl edit <name> [flags]

Flags

FlagShortDefaultDescription
--method-XnoneChange the HTTP method
--url-unoneChange the request URL
--header-HnoneAdd a header 'Key: Value' (repeatable)
--remove-header--rm-headernoneRemove a header by key (repeatable)
--body, --data-dnoneChange the request body
--collection-cnoneMove to a collection
--tag-tnoneAdd a tag (repeatable)
--pre-script--prenoneSet the pre-request script
--post-script--postnoneSet the post-response script
--run-ifnoneSet a conditional run expression (VAR == VALUE or VAR != VALUE)
--extractnoneAdd or replace an extraction rule VAR=METHOD:EXPR (repeatable)
--remove-extractnoneRemove an extraction rule by variable name (repeatable)
--assert-anoneAdd an assertion field=op=value (repeatable)
--authnoneAuth type: basic, bearer, apikey, oauth1, oauth2, awsv4, digest, ntlm, none
--auth-paramnoneAuth parameter KEY=VALUE (repeatable)

Aliases

  • e

Examples

Point a request at a new URL

gurl edit "list-users" --url '{{BASE_URL}}/v2/users'

Add flow metadata for chaining

gurl edit "get-profile" \
  --run-if "token != ''" \
  --extract userId=jsonpath:'$.id' \
  --post-script "gurl.setVariable('seenProfile', 'true')"

Replace or clear saved auth

gurl edit "profile" --auth bearer --auth-param token='{{token}}'
gurl edit "profile" --auth none

--auth none clears auth and cannot be combined with --auth-param.

Related commands