github unkn0wn-root/resterm v1.13.3

6 hours ago

v1.13.3

A small follow-up to 1.13.2 to fix a couple of confusing edge cases. Quoted options could look like plain text in the editor but still affect requests; that's now fixed. I've also added a warning for trace budgets written with ==.

Quoted options

The parser used to strip the quotes from "timeout=1s" and set the timeout. It now treats that field as text, matching highlighting and completion.

Directives such as @settings, @ssh, @k8s, @sse, and @mock warn when an option is quoted as a whole:

# @settings "timeout=1s"

### Health
GET {{base.url}}/health
Warnings:
  api.http:1: @settings option "timeout=1s" is quoted. Write it as timeout=1s

The warning doesn't stop the run. Other options on the same line still apply. To set the timeout, write timeout=1s. If a value needs spaces, quote just the value: cmd="gh auth token".

Other directives handle these fields differently:

  • @auth rejects quoted fields where it expects options. In 1.13.2, # @auth global command "name=gh" cmd="gh auth token" named the definition gh. It now reports a parse error and stops the run:

    error[parse]: @auth expects key=value options but got "name=gh". Quote a value that has spaces
    

    Use name=gh to name the definition.

  • @trace reports an unknown option, such as unknown @trace option "total=1s".

  • @compare and @script treat the quoted field as a value.

The request file docs list the option rules.

Trace budget typos

dns==50ms used to be ignored silently. It now produces a warning:

### Health
# @trace dns==50ms total<=400ms
GET {{base.url}}/health
Warnings:
  api.http:2: unknown @trace option "dns==50ms"

Use dns<=50ms or dns=50ms.

Upgrading from 1.13.0 or earlier

  • 1.13.2 enforces request_headers<= and request_body<= budgets, exits with 2 on usage errors in init, collection, and history, and rejects @auth apikey cookie.
  • 1.13.2 also made <= in place of = an error in regular options, as in # @settings timeout<=1s. Only @trace budgets take <=. A file or global @ssh or @k8s profile written this way is not available to requests.

Don't miss a new resterm release

NewReleases is sending notifications on new releases.