Orange-OpenSource / hurl

Hurl, run and test HTTP requests with plain text.
https://hurl.dev
Apache License 2.0
12.73k stars 477 forks source link

max-redirs: -1 can't be set in [Options] section #3023

Closed jcamiel closed 2 months ago

jcamiel commented 2 months ago

max-redirs=-1 can't be used in [Options] section.

Example 1:

GET https://google.fr
[Options]
location: true
max-redirs: -1
HTTP 200
$ hurl /tmp/google.hurl
error: Parsing literal
  --> /tmp/google.hurl:4:13
   |
 4 | max-redirs: -1
   |             ^ expecting 'integer'
   |

Example 2:

GET https://google.fr
[Options]
location: true
variable: max=-1
max-redirs: {{max}}
HTTP 200
$ hurl /tmp/google.hurl
error: Invalid variable type
  --> /tmp/google.hurl:5:15
   |
   | GET https://google.fr
   | ...
 5 | max-redirs: {{max}}
   |               ^^^ expecting positive integer, actual value is integer <-1>
   |