hurl 8.0.0

Hurl, run and test HTTP requests
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
/*
 * Hurl (https://hurl.dev)
 * Copyright (C) 2026 Orange
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *          http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
// Generated by bin/spec/options/generate_source.py - Do not modify

pub fn input_files() -> clap::Arg {
    clap::Arg::new("input_files")
        .value_name("FILES")
        .help("Set the input file to use")
        .required(false)
        .index(1)
        .num_args(1..)
}

pub fn aws_sigv4() -> clap::Arg {
    clap::Arg::new("aws_sigv4")
        .long("aws-sigv4")
        .value_name("PROVIDER1[:PROVIDER2[:REGION[:SERVICE]]]")
        .help("Use AWS V4 signature authentication in the transfer")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn cacert_file() -> clap::Arg {
    clap::Arg::new("cacert_file")
        .long("cacert")
        .value_name("FILE")
        .help("CA certificate to verify peer against (PEM format)")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn client_cert_file() -> clap::Arg {
    clap::Arg::new("client_cert_file")
        .long("cert")
        .short('E')
        .value_name("CERTIFICATE[:PASSWORD]")
        .help("Client certificate file and password")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn client_key_file() -> clap::Arg {
    clap::Arg::new("client_key_file")
        .long("key")
        .value_name("KEY")
        .help("Private key file name")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn color() -> clap::Arg {
    clap::Arg::new("color")
        .long("color")
        .help("Colorize output")
        .help_heading("Output options")
        .conflicts_with("no_color")
        .action(clap::ArgAction::SetTrue)
}

pub fn compressed() -> clap::Arg {
    clap::Arg::new("compressed")
        .long("compressed")
        .help("Request compressed response (using deflate or gzip)")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn connect_timeout() -> clap::Arg {
    clap::Arg::new("connect_timeout")
        .long("connect-timeout")
        .value_name("SECONDS")
        .help("Maximum time allowed for connection [default: 300]")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn connect_to() -> clap::Arg {
    clap::Arg::new("connect_to")
        .long("connect-to")
        .value_name("HOST1:PORT1:HOST2:PORT2")
        .help("For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead")
        .help_heading("HTTP options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn continue_on_error() -> clap::Arg {
    clap::Arg::new("continue_on_error")
        .long("continue-on-error")
        .help("Continue executing requests even if an error occurs")
        .help_heading("Run options")
        .action(clap::ArgAction::SetTrue)
}

pub fn cookies_input_file() -> clap::Arg {
    clap::Arg::new("cookies_input_file")
        .long("cookie")
        .short('b')
        .value_name("FILE")
        .help("Read cookies from FILE")
        .help_heading("Other options")
        .num_args(1)
}

pub fn cookies_output_file() -> clap::Arg {
    clap::Arg::new("cookies_output_file")
        .long("cookie-jar")
        .short('c')
        .value_name("FILE")
        .help("Write cookies to FILE after running the session")
        .help_heading("Other options")
        .num_args(1)
}

pub fn curl() -> clap::Arg {
    clap::Arg::new("curl")
        .long("curl")
        .value_name("FILE")
        .help("Export each request to a list of curl commands")
        .help_heading("Output options")
        .num_args(1)
}

pub fn delay() -> clap::Arg {
    clap::Arg::new("delay")
        .long("delay")
        .value_name("MILLISECONDS")
        .help("Sets delay before each request (aka sleep) [default: 0]")
        .help_heading("Run options")
        .num_args(1)
}

pub fn digest() -> clap::Arg {
    clap::Arg::new("digest")
        .long("digest")
        .help("Tell Hurl to use HTTP Digest authentication")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn error_format() -> clap::Arg {
    clap::Arg::new("error_format")
        .long("error-format")
        .value_name("FORMAT")
        .value_parser(["short", "long"])
        .help("Control the format of error messages [default: short]")
        .help_heading("Output options")
        .num_args(1)
}

pub fn file_root() -> clap::Arg {
    clap::Arg::new("file_root")
        .long("file-root")
        .value_name("DIR")
        .help("Set root directory to import files [default: input file directory]")
        .help_heading("Other options")
        .num_args(1)
}

pub fn follow_location() -> clap::Arg {
    clap::Arg::new("follow_location")
        .long("location")
        .short('L')
        .help("Follow redirects")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn follow_location_trusted() -> clap::Arg {
    clap::Arg::new("follow_location_trusted")
        .long("location-trusted")
        .help("Follow redirects but allows sending the name + password to all hosts that the site may redirect to")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn from_entry() -> clap::Arg {
    clap::Arg::new("from_entry")
        .long("from-entry")
        .value_name("ENTRY_NUMBER")
        .value_parser(clap::value_parser!(u32).range(1..))
        .help("Execute Hurl file from ENTRY_NUMBER (starting at 1)")
        .help_heading("Run options")
        .num_args(1)
}

pub fn glob() -> clap::Arg {
    clap::Arg::new("glob")
        .long("glob")
        .value_name("GLOB")
        .help("Specify input files that match the given GLOB. Multiple glob flags may be used")
        .help_heading("Other options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn header() -> clap::Arg {
    clap::Arg::new("header")
        .long("header")
        .short('H')
        .value_name("NAME:VALUE")
        .help("Pass custom header(s) to server")
        .help_heading("HTTP options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn http10() -> clap::Arg {
    clap::Arg::new("http10")
        .long("http1.0")
        .short('0')
        .help("Tell Hurl to use HTTP version 1.0")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn http11() -> clap::Arg {
    clap::Arg::new("http11")
        .long("http1.1")
        .help("Tell Hurl to use HTTP version 1.1")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn http2() -> clap::Arg {
    clap::Arg::new("http2")
        .long("http2")
        .help("Tell Hurl to use HTTP version 2")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn http3() -> clap::Arg {
    clap::Arg::new("http3")
        .long("http3")
        .help("Tell Hurl to use HTTP version 3")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn include() -> clap::Arg {
    clap::Arg::new("include")
        .long("include")
        .short('i')
        .help("Include the HTTP headers in the output")
        .help_heading("Output options")
        .action(clap::ArgAction::SetTrue)
}

pub fn insecure() -> clap::Arg {
    clap::Arg::new("insecure")
        .long("insecure")
        .short('k')
        .help("Allow insecure SSL connections")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn ipv4() -> clap::Arg {
    clap::Arg::new("ipv4")
        .long("ipv4")
        .short('4')
        .help("Tell Hurl to use IPv4 addresses only when resolving host names, and not for example try IPv6")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn ipv6() -> clap::Arg {
    clap::Arg::new("ipv6")
        .long("ipv6")
        .short('6')
        .help("Tell Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn jobs() -> clap::Arg {
    clap::Arg::new("jobs")
        .long("jobs")
        .value_name("NUM")
        .value_parser(clap::value_parser!(u32).range(1..))
        .help("Maximum number of parallel jobs, 1 to disable parallel execution")
        .help_heading("Run options")
        .num_args(1)
}

pub fn json() -> clap::Arg {
    clap::Arg::new("json")
        .long("json")
        .help("Output each Hurl file result to JSON")
        .help_heading("Output options")
        .conflicts_with("no_output")
        .action(clap::ArgAction::SetTrue)
}

pub fn limit_rate() -> clap::Arg {
    clap::Arg::new("limit_rate")
        .long("limit-rate")
        .value_name("SPEED")
        .value_parser(clap::value_parser!(u64))
        .help("Specify the maximum transfer rate in bytes/second, for both downloads and uploads")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn max_filesize() -> clap::Arg {
    clap::Arg::new("max_filesize")
        .long("max-filesize")
        .value_name("BYTES")
        .value_parser(clap::value_parser!(u64))
        .help("Specify the maximum size in bytes of a file to download")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn max_redirects() -> clap::Arg {
    clap::Arg::new("max_redirects")
        .long("max-redirs")
        .value_name("NUM")
        .value_parser(clap::value_parser!(i32))
        .help("Maximum number of redirects allowed, -1 for unlimited redirects [default: 50]")
        .help_heading("HTTP options")
        .num_args(1)
        .allow_negative_numbers(true)
}

pub fn max_time() -> clap::Arg {
    clap::Arg::new("max_time")
        .long("max-time")
        .short('m')
        .value_name("SECONDS")
        .help("Maximum time allowed for the transfer [default: 300]")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn negotiate() -> clap::Arg {
    clap::Arg::new("negotiate")
        .long("negotiate")
        .help("Tell Hurl to use Negotiate (SPNEGO) authentication")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn netrc() -> clap::Arg {
    clap::Arg::new("netrc")
        .long("netrc")
        .short('n')
        .help("Must read .netrc for username and password")
        .help_heading("Other options")
        .conflicts_with("netrc_file")
        .conflicts_with("netrc_optional")
        .action(clap::ArgAction::SetTrue)
}

pub fn netrc_file() -> clap::Arg {
    clap::Arg::new("netrc_file")
        .long("netrc-file")
        .value_name("FILE")
        .help("Specify FILE for .netrc")
        .help_heading("Other options")
        .conflicts_with("netrc")
        .num_args(1)
}

pub fn netrc_optional() -> clap::Arg {
    clap::Arg::new("netrc_optional")
        .long("netrc-optional")
        .help("Use either .netrc or the URL")
        .help_heading("Other options")
        .conflicts_with("netrc")
        .action(clap::ArgAction::SetTrue)
}

pub fn no_assert() -> clap::Arg {
    clap::Arg::new("no_assert")
        .long("no-assert")
        .help("Ignore asserts defined in the Hurl file")
        .help_heading("Run options")
        .action(clap::ArgAction::SetTrue)
}

pub fn no_color() -> clap::Arg {
    clap::Arg::new("no_color")
        .long("no-color")
        .help("Do not colorize output")
        .help_heading("Output options")
        .conflicts_with("color")
        .action(clap::ArgAction::SetTrue)
}

pub fn no_cookie_store() -> clap::Arg {
    clap::Arg::new("no_cookie_store")
        .long("no-cookie-store")
        .help("Do not use cookie store between requests")
        .help_heading("HTTP options")
        .conflicts_with("cookies_input_file")
        .action(clap::ArgAction::SetTrue)
}

pub fn no_output() -> clap::Arg {
    clap::Arg::new("no_output")
        .long("no-output")
        .help("Suppress output. By default, Hurl outputs the body of the last response")
        .help_heading("Output options")
        .conflicts_with("json")
        .action(clap::ArgAction::SetTrue)
}

pub fn no_pretty() -> clap::Arg {
    clap::Arg::new("no_pretty")
        .long("no-pretty")
        .help("Do not prettify response output")
        .help_heading("Output options")
        .conflicts_with("pretty")
        .action(clap::ArgAction::SetTrue)
}

pub fn no_proxy() -> clap::Arg {
    clap::Arg::new("no_proxy")
        .long("no-proxy")
        .alias("noproxy")
        .value_name("HOST(S)")
        .help("List of hosts which do not use proxy")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn ntlm() -> clap::Arg {
    clap::Arg::new("ntlm")
        .long("ntlm")
        .help("Tell Hurl to use NTLM authentication")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn output() -> clap::Arg {
    clap::Arg::new("output")
        .long("output")
        .short('o')
        .value_name("FILE")
        .help("Write to FILE instead of stdout")
        .help_heading("Output options")
        .num_args(1)
}

pub fn parallel() -> clap::Arg {
    clap::Arg::new("parallel")
        .long("parallel")
        .help("Run files in parallel (default in test mode)")
        .help_heading("Run options")
        .action(clap::ArgAction::SetTrue)
}

pub fn path_as_is() -> clap::Arg {
    clap::Arg::new("path_as_is")
        .long("path-as-is")
        .help("Tell Hurl to not handle sequences of /../ or /./ in the given URL path")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn pinned_pub_key() -> clap::Arg {
    clap::Arg::new("pinned_pub_key")
        .long("pinnedpubkey")
        .value_name("HASHES")
        .help("Public key to verify peer against")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn pretty() -> clap::Arg {
    clap::Arg::new("pretty")
        .long("pretty")
        .help("Prettify JSON response output")
        .help_heading("Output options")
        .action(clap::ArgAction::SetTrue)
}

pub fn progress_bar() -> clap::Arg {
    clap::Arg::new("progress_bar")
        .long("progress-bar")
        .help("Display a progress bar in test mode")
        .help_heading("Output options")
        .action(clap::ArgAction::SetTrue)
}

pub fn proxy() -> clap::Arg {
    clap::Arg::new("proxy")
        .long("proxy")
        .short('x')
        .value_name("[PROTOCOL://]HOST[:PORT]")
        .help("Use proxy on given PROTOCOL/HOST/PORT")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn repeat() -> clap::Arg {
    clap::Arg::new("repeat")
        .long("repeat")
        .value_name("NUM")
        .value_parser(clap::value_parser!(i32))
        .help("Repeat the input files sequence NUM times, -1 for infinite loop")
        .help_heading("Run options")
        .num_args(1)
        .allow_negative_numbers(true)
}

pub fn report_html() -> clap::Arg {
    clap::Arg::new("report_html")
        .long("report-html")
        .value_name("DIR")
        .help("Generate HTML report to DIR")
        .help_heading("Report options")
        .num_args(1)
}

pub fn report_json() -> clap::Arg {
    clap::Arg::new("report_json")
        .long("report-json")
        .value_name("DIR")
        .help("Generate JSON report to DIR")
        .help_heading("Report options")
        .num_args(1)
}

pub fn report_junit() -> clap::Arg {
    clap::Arg::new("report_junit")
        .long("report-junit")
        .value_name("FILE")
        .help("Write a JUnit XML report to FILE")
        .help_heading("Report options")
        .num_args(1)
}

pub fn report_tap() -> clap::Arg {
    clap::Arg::new("report_tap")
        .long("report-tap")
        .value_name("FILE")
        .help("Write a TAP report to FILE")
        .help_heading("Report options")
        .num_args(1)
}

pub fn resolve() -> clap::Arg {
    clap::Arg::new("resolve")
        .long("resolve")
        .value_name("HOST:PORT:ADDR")
        .help("Provide a custom address for a specific HOST and PORT pair")
        .help_heading("HTTP options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn retry() -> clap::Arg {
    clap::Arg::new("retry")
        .long("retry")
        .value_name("NUM")
        .value_parser(clap::value_parser!(i32))
        .help("Maximum number of retries, 0 for no retries, -1 for unlimited retries")
        .help_heading("Run options")
        .num_args(1)
        .allow_negative_numbers(true)
}

pub fn retry_interval() -> clap::Arg {
    clap::Arg::new("retry_interval")
        .long("retry-interval")
        .value_name("MILLISECONDS")
        .help("Interval in milliseconds before a retry [default: 1000]")
        .help_heading("Run options")
        .num_args(1)
}

pub fn secret() -> clap::Arg {
    clap::Arg::new("secret")
        .long("secret")
        .value_name("NAME=VALUE")
        .help("Define a variable which value is secret")
        .help_heading("Run options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn secrets_file() -> clap::Arg {
    clap::Arg::new("secrets_file")
        .long("secrets-file")
        .value_name("FILE")
        .help("Define a secrets file in which you define your secrets")
        .help_heading("Run options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn ssl_no_revoke() -> clap::Arg {
    clap::Arg::new("ssl_no_revoke")
        .long("ssl-no-revoke")
        .help("(Windows) Tell Hurl to disable certificate revocation checks")
        .help_heading("HTTP options")
        .action(clap::ArgAction::SetTrue)
}

pub fn test() -> clap::Arg {
    clap::Arg::new("test")
        .long("test")
        .help("Activate test mode (use parallel execution)")
        .help_heading("Run options")
        .action(clap::ArgAction::SetTrue)
}

pub fn to_entry() -> clap::Arg {
    clap::Arg::new("to_entry")
        .long("to-entry")
        .value_name("ENTRY_NUMBER")
        .value_parser(clap::value_parser!(u32).range(1..))
        .help("Execute Hurl file to ENTRY_NUMBER (starting at 1)")
        .help_heading("Run options")
        .num_args(1)
}

pub fn unix_socket() -> clap::Arg {
    clap::Arg::new("unix_socket")
        .long("unix-socket")
        .value_name("PATH")
        .help("(HTTP) Connect through this Unix domain socket, instead of using the network")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn user() -> clap::Arg {
    clap::Arg::new("user")
        .long("user")
        .short('u')
        .value_name("USER:PASSWORD")
        .help("Add basic Authentication header to each request")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn user_agent() -> clap::Arg {
    clap::Arg::new("user_agent")
        .long("user-agent")
        .short('A')
        .value_name("NAME")
        .help("Specify the User-Agent string to send to the HTTP server")
        .help_heading("HTTP options")
        .num_args(1)
}

pub fn variable() -> clap::Arg {
    clap::Arg::new("variable")
        .long("variable")
        .value_name("NAME=VALUE")
        .help("Define a variable")
        .help_heading("Run options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn variables_file() -> clap::Arg {
    clap::Arg::new("variables_file")
        .long("variables-file")
        .value_name("FILE")
        .help("Define a properties file in which you define your variables")
        .help_heading("Run options")
        .num_args(1)
        .action(clap::ArgAction::Append)
}

pub fn verbose() -> clap::Arg {
    clap::Arg::new("verbose")
        .long("verbose")
        .short('v')
        .help("Turn on verbose (alias to --verbosity verbose)")
        .help_heading("Output options")
        .action(clap::ArgAction::SetTrue)
}

pub fn verbosity() -> clap::Arg {
    clap::Arg::new("verbosity")
        .long("verbosity")
        .value_name("LEVEL")
        .value_parser(["brief", "verbose", "debug"])
        .help("Set verbosity level for debug log")
        .help_heading("Output options")
        .num_args(1)
}

pub fn very_verbose() -> clap::Arg {
    clap::Arg::new("very_verbose")
        .long("very-verbose")
        .help("Turn on very verbose output, including HTTP response and libcurl logs (alias to --verbosity debug)")
        .help_heading("Output options")
        .action(clap::ArgAction::SetTrue)
}