zap_api 0.0.2

The Rust implementation to access the OWASP ZAP API
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
711
712
713
714
715
716
717
718
719
720
721
722
723
/* Zed Attack Proxy (ZAP) and its related class files.
 *
 * ZAP is an HTTP/HTTPS proxy for assessing web application security.
 *
 * Copyright 2019 the ZAP development team
 *
 * 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.
 */

use super::ZapApiError;
use super::ZapService;
use serde_json::Value;
use std::collections::HashMap;

/**
 * This file was automatically generated.
 */
pub fn status(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "view", "status", params)
}

pub fn results(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "view", "results", params)
}

pub fn full_results(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "view", "fullResults", params)
}

pub fn scans(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "scans", params)
}

/**
 * Gets the regexes of URLs excluded from the spider scans.
*/
pub fn excluded_from_scan(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "excludedFromScan", params)
}

/**
 * Returns a list of unique URLs from the history table based on HTTP messages added by the Spider.
*/
pub fn all_urls(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "allUrls", params)
}

/**
 * Returns a list of the names of the nodes added to the Sites tree by the specified scan.
*/
pub fn added_nodes(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "view", "addedNodes", params)
}

/**
 * Gets all the domains that are always in scope. For each domain the following are shown: the index, the value (domain), if enabled, and if specified as a regex.
*/
pub fn domains_always_in_scope(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "domainsAlwaysInScope", params)
}

/**
 * Use view domainsAlwaysInScope instead.
 * Deprecated
*/
pub fn option_domains_always_in_scope(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(
        service,
        "spider",
        "view",
        "optionDomainsAlwaysInScope",
        params,
    )
}

/**
 * Use view domainsAlwaysInScope instead.
 * Deprecated
*/
pub fn option_domains_always_in_scope_enabled(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(
        service,
        "spider",
        "view",
        "optionDomainsAlwaysInScopeEnabled",
        params,
    )
}

pub fn option_handle_parameters(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionHandleParameters", params)
}

/**
 * Gets the maximum number of child nodes (per node) that can be crawled, 0 means no limit.
*/
pub fn option_max_children(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionMaxChildren", params)
}

/**
 * Gets the maximum depth the spider can crawl, 0 if unlimited.
*/
pub fn option_max_depth(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionMaxDepth", params)
}

pub fn option_max_duration(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionMaxDuration", params)
}

/**
 * Gets the maximum size, in bytes, that a response might have to be parsed.
*/
pub fn option_max_parse_size_bytes(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionMaxParseSizeBytes", params)
}

pub fn option_max_scans_in_ui(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionMaxScansInUI", params)
}

pub fn option_request_wait_time(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionRequestWaitTime", params)
}

pub fn option_scope(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionScope", params)
}

pub fn option_scope_text(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionScopeText", params)
}

pub fn option_skip_url_string(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionSkipURLString", params)
}

pub fn option_thread_count(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionThreadCount", params)
}

pub fn option_user_agent(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionUserAgent", params)
}

/**
 * Gets whether or not a spider process should accept cookies while spidering.
*/
pub fn option_accept_cookies(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionAcceptCookies", params)
}

pub fn option_handle_o_data_parameters_visited(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(
        service,
        "spider",
        "view",
        "optionHandleODataParametersVisited",
        params,
    )
}

pub fn option_parse_comments(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionParseComments", params)
}

pub fn option_parse_git(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionParseGit", params)
}

pub fn option_parse_robots_txt(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionParseRobotsTxt", params)
}

pub fn option_parse_svn_entries(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionParseSVNEntries", params)
}

pub fn option_parse_sitemap_xml(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionParseSitemapXml", params)
}

pub fn option_post_form(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionPostForm", params)
}

pub fn option_process_form(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionProcessForm", params)
}

/**
 * Gets whether or not the 'Referer' header should be sent while spidering.
*/
pub fn option_send_referer_header(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "view", "optionSendRefererHeader", params)
}

pub fn option_show_advanced_dialog(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(
        service,
        "spider",
        "view",
        "optionShowAdvancedDialog",
        params,
    )
}

/**
 * Runs the spider against the given URL (or context). Optionally, the 'maxChildren' parameter can be set to limit the number of children scanned, the 'recurse' parameter can be used to prevent the spider from seeding recursively, the parameter 'contextName' can be used to constrain the scan to a Context and the parameter 'subtreeOnly' allows to restrict the spider under a site's subtree (using the specified 'url').
*/
pub fn scan(
    service: &ZapService,
    url: String,
    maxchildren: String,
    recurse: String,
    contextname: String,
    subtreeonly: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("url".to_string(), url);
    params.insert("maxChildren".to_string(), maxchildren);
    params.insert("recurse".to_string(), recurse);
    params.insert("contextName".to_string(), contextname);
    params.insert("subtreeOnly".to_string(), subtreeonly);
    super::call(service, "spider", "action", "scan", params)
}

/**
 * Runs the spider from the perspective of a User, obtained using the given Context ID and User ID. See 'scan' action for more details.
*/
pub fn scan_as_user(
    service: &ZapService,
    contextid: String,
    userid: String,
    url: String,
    maxchildren: String,
    recurse: String,
    subtreeonly: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("contextId".to_string(), contextid);
    params.insert("userId".to_string(), userid);
    params.insert("url".to_string(), url);
    params.insert("maxChildren".to_string(), maxchildren);
    params.insert("recurse".to_string(), recurse);
    params.insert("subtreeOnly".to_string(), subtreeonly);
    super::call(service, "spider", "action", "scanAsUser", params)
}

pub fn pause(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "action", "pause", params)
}

pub fn resume(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "action", "resume", params)
}

pub fn stop(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "action", "stop", params)
}

pub fn remove_scan(service: &ZapService, scanid: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("scanId".to_string(), scanid);
    super::call(service, "spider", "action", "removeScan", params)
}

pub fn pause_all_scans(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "action", "pauseAllScans", params)
}

pub fn resume_all_scans(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "action", "resumeAllScans", params)
}

pub fn stop_all_scans(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "action", "stopAllScans", params)
}

pub fn remove_all_scans(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "action", "removeAllScans", params)
}

/**
 * Clears the regexes of URLs excluded from the spider scans.
*/
pub fn clear_excluded_from_scan(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(service, "spider", "action", "clearExcludedFromScan", params)
}

/**
 * Adds a regex of URLs that should be excluded from the spider scans.
*/
pub fn exclude_from_scan(service: &ZapService, regex: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("regex".to_string(), regex);
    super::call(service, "spider", "action", "excludeFromScan", params)
}

/**
 * Adds a new domain that's always in scope, using the specified value. Optionally sets if the new entry is enabled (default, true) and whether or not the new value is specified as a regex (default, false).
*/
pub fn add_domain_always_in_scope(
    service: &ZapService,
    value: String,
    isregex: String,
    isenabled: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("value".to_string(), value);
    params.insert("isRegex".to_string(), isregex);
    params.insert("isEnabled".to_string(), isenabled);
    super::call(
        service,
        "spider",
        "action",
        "addDomainAlwaysInScope",
        params,
    )
}

/**
 * Modifies a domain that's always in scope. Allows to modify the value, if enabled or if a regex. The domain is selected with its index, which can be obtained with the view domainsAlwaysInScope.
*/
pub fn modify_domain_always_in_scope(
    service: &ZapService,
    idx: String,
    value: String,
    isregex: String,
    isenabled: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("idx".to_string(), idx);
    params.insert("value".to_string(), value);
    params.insert("isRegex".to_string(), isregex);
    params.insert("isEnabled".to_string(), isenabled);
    super::call(
        service,
        "spider",
        "action",
        "modifyDomainAlwaysInScope",
        params,
    )
}

/**
 * Removes a domain that's always in scope, with the given index. The index can be obtained with the view domainsAlwaysInScope.
*/
pub fn remove_domain_always_in_scope(
    service: &ZapService,
    idx: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("idx".to_string(), idx);
    super::call(
        service,
        "spider",
        "action",
        "removeDomainAlwaysInScope",
        params,
    )
}

/**
 * Enables all domains that are always in scope.
*/
pub fn enable_all_domains_always_in_scope(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(
        service,
        "spider",
        "action",
        "enableAllDomainsAlwaysInScope",
        params,
    )
}

/**
 * Disables all domains that are always in scope.
*/
pub fn disable_all_domains_always_in_scope(service: &ZapService) -> Result<Value, ZapApiError> {
    let params = HashMap::new();
    super::call(
        service,
        "spider",
        "action",
        "disableAllDomainsAlwaysInScope",
        params,
    )
}

pub fn set_option_handle_parameters(
    service: &ZapService,
    string: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("String".to_string(), string);
    super::call(
        service,
        "spider",
        "action",
        "setOptionHandleParameters",
        params,
    )
}

/**
 * Use actions [add|modify|remove]DomainAlwaysInScope instead.
 * Deprecated Option no longer in effective use.
*/
pub fn set_option_scope_string(service: &ZapService, string: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("String".to_string(), string);
    super::call(service, "spider", "action", "setOptionScopeString", params)
}

pub fn set_option_skip_url_string(
    service: &ZapService,
    string: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("String".to_string(), string);
    super::call(
        service,
        "spider",
        "action",
        "setOptionSkipURLString",
        params,
    )
}

pub fn set_option_user_agent(service: &ZapService, string: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("String".to_string(), string);
    super::call(service, "spider", "action", "setOptionUserAgent", params)
}

/**
 * Sets whether or not a spider process should accept cookies while spidering.
*/
pub fn set_option_accept_cookies(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionAcceptCookies",
        params,
    )
}

pub fn set_option_handle_o_data_parameters_visited(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionHandleODataParametersVisited",
        params,
    )
}

/**
 * Sets the maximum number of child nodes (per node) that can be crawled, 0 means no limit.
*/
pub fn set_option_max_children(
    service: &ZapService,
    integer: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(service, "spider", "action", "setOptionMaxChildren", params)
}

/**
 * Sets the maximum depth the spider can crawl, 0 for unlimited depth.
*/
pub fn set_option_max_depth(service: &ZapService, integer: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(service, "spider", "action", "setOptionMaxDepth", params)
}

pub fn set_option_max_duration(
    service: &ZapService,
    integer: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(service, "spider", "action", "setOptionMaxDuration", params)
}

/**
 * Sets the maximum size, in bytes, that a response might have to be parsed. This allows the spider to skip big responses/files.
*/
pub fn set_option_max_parse_size_bytes(
    service: &ZapService,
    integer: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(
        service,
        "spider",
        "action",
        "setOptionMaxParseSizeBytes",
        params,
    )
}

pub fn set_option_max_scans_in_ui(
    service: &ZapService,
    integer: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(service, "spider", "action", "setOptionMaxScansInUI", params)
}

pub fn set_option_parse_comments(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionParseComments",
        params,
    )
}

pub fn set_option_parse_git(service: &ZapService, boolean: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(service, "spider", "action", "setOptionParseGit", params)
}

pub fn set_option_parse_robots_txt(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionParseRobotsTxt",
        params,
    )
}

pub fn set_option_parse_svn_entries(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionParseSVNEntries",
        params,
    )
}

pub fn set_option_parse_sitemap_xml(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionParseSitemapXml",
        params,
    )
}

pub fn set_option_post_form(service: &ZapService, boolean: String) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(service, "spider", "action", "setOptionPostForm", params)
}

pub fn set_option_process_form(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(service, "spider", "action", "setOptionProcessForm", params)
}

pub fn set_option_request_wait_time(
    service: &ZapService,
    integer: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(
        service,
        "spider",
        "action",
        "setOptionRequestWaitTime",
        params,
    )
}

/**
 * Sets whether or not the 'Referer' header should be sent while spidering.
*/
pub fn set_option_send_referer_header(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionSendRefererHeader",
        params,
    )
}

pub fn set_option_show_advanced_dialog(
    service: &ZapService,
    boolean: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Boolean".to_string(), boolean);
    super::call(
        service,
        "spider",
        "action",
        "setOptionShowAdvancedDialog",
        params,
    )
}

pub fn set_option_thread_count(
    service: &ZapService,
    integer: String,
) -> Result<Value, ZapApiError> {
    let mut params = HashMap::new();
    params.insert("Integer".to_string(), integer);
    super::call(service, "spider", "action", "setOptionThreadCount", params)
}